- 18 5月, 2013 4 次提交
-
-
由 H Hartley Sweeten 提交于
Move comedi_load_firmware() from jr3_pci.c to drivers.c and export it for general use by the comedi drivers. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Refactor the function to remove some unnecessary indents and make it a bit more concise. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
kasprintf combines kmalloc and sprintf, and takes care of the size calculation itself. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xenia Ragiadakou 提交于
This patch fixes the access byteorder of wMaxPacketSize which is __le16, following the USB standard, and needs to be converted into native cpu byteorder in order to be accessed. Instead of using le16_to_cpu(hep->desc.wMaxPacketSize), it was used the usb_endpoint_maxp() function, defined in <uapi/linux/usb/ch9.h> Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 17 5月, 2013 36 次提交
-
-
由 Xenia Ragiadakou 提交于
This patch fixes the following checkpatch errors, in r8192U_dm.c: ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xenia Ragiadakou 提交于
This patch fixes the following checkpatch errors: ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xenia Ragiadakou 提交于
This patch fixes the following checkpatch errors, in r8190_rtl8256.c: ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xenia Ragiadakou 提交于
This patch fixes the following checkpatch error: ERROR: space prohibited after that '~' Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xenia Ragiadakou 提交于
This patch fixes the following checkpatch error: ERROR: space prohibited after that '~' Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xenia Ragiadakou 提交于
This patch fixes the whitespace around ~ and corrects the following checkpatch error: ERROR: space prohibited after that '~' Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xenia Ragiadakou 提交于
This patch fixes a part of the following checkpatch error: ERROR: space required before the open parenthesis '(' by adding space after if Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xenia Ragiadakou 提交于
This patch fixes a part of the following checkpatch error: ERROR: space required before the open parenthesis '(' by adding space after if Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xenia Ragiadakou 提交于
This patch fixes a part of the following checkpatch error: ERROR: space required before the open parenthesis '(' by adding space after if Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xenia Ragiadakou 提交于
This patch fixes a part of the following checkpatch error: ERROR: space required before the open parenthesis '(' by adding space after if Signed-off-by: NXenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Elena Ufimtseva 提交于
Patch removes unused typedefs BOOLEAN, *LPCSTR, *LPCSTR, UCHAR, *LPBYTE. Signed-off-by: NElena Ufimtseva <ufimtseva@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Elena Ufimtseva 提交于
Patch removes usage of typedef unsigned int DWORD. Signed-off-by: NElena Ufimtseva <ufimtseva@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Elena Ufimtseva 提交于
Patch removes the use of typedef unsigned short WORD. Signed-off-by: NElena Ufimtseva <ufimtseva@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The DT9812 is part of the ECONseries of USB Data Acquisition Modules. This driver only supports the DT9812-10V and DT9812-2.5V versions of the module. Do not attach to the device if an unsupported module is detected. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The 'default' case should never happen. In case it does, default the gain to '1'. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The timeout values passed to usb_bulk_msg() should be in milliseconds not jiffies. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The struct dt9812_usb_cmd definition contains some #if 0'ed out code that would cause build errors if enabled. Just remove it. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
For consistency in the driver, use dev->class_dev for the device in all the dev_{level} messages. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
There are no pr_{level} messages in this driver. Remove the pr_fmt(). Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
For aesthetic reasons, rename the function to help with grepping and rename some of the local vars. The dt9812_analog_out() function can fail. Make sure to check for any failure and return the errno. The comedi core expects the (*insn_write) functions to return either an errno or the number of samples written. Change the final return to insn->n to make this clearer. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
For aesthetic reasons, rename the function to help with grepping and rename some of the local vars. This function returns the current analog output value for the channel that is cached in the private data. Absorb dt9812_analog_out_shadow() into this function to make it more concise. The comedi core expects the (*insn_read) functions to return either an errno or the number of samples read. Change the final return to insn->n to make this clearer. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
For aesthetic reasons, rename the function to help with grepping and rename some of the local vars. dt9812_analog_in() can fail. Make sure to check for any failure and return the errno. The comedi core expects the (*insn_read) functions to return either an errno or the number of samples read. Change the final return to insn->n to make this clearer. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Currently the (*insn_write) function for the digital output subdevice only sets the state for a single channel. It's more efficent to use the (*insn_bits) function and allow setting the state for all the channels. The comedi core can use the (*insn_bits) to emulate the (*insn_write) if needed. Also, use the subdevice 'state' variable to hold the current state of the channels instead of 'do_shadow' in the private data. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Currently the (*insn_read) function for the digital input subdevice returns the state for a single channel. It's more efficent to use the (*insn_bits) function and return the state for all the channels. The comedi core can use the (*insn_bits) to emulate the (*insn_read) if needed. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The vendor, product, and serial numbers read from the usb device are only used for a dev_info() message about the device after it is reset. Reading these values might not be required for the usb device to function. For now just remove the variables from the private data and just use local variables. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Converting this driver to use the comedi (*auto_attach) mechanism allows pushing the usb (*probe) into the comedi (*auto_attach) and the usb (disconnect) into the comedi (*detach). This removes the disconnect between the usb driver and the comedi driver. Now when the comedi driver is attached it will always have a usb device associated with it. This removes the 16 usb device limitation and allows bringing all the private data into a single struct that can be kzalloc'ed when the comedi driver is (*auto_attached). It also allows removing the the sanity checks that make sure a usb device is connected to the comedi device in the helper functions. For aesthetic reasons, add some whitespace to the subdevice init. Also, fix the analog out subdevice. There are 2 analog output channels available on the usb device. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
When this driver is converted to the comedi (*auto_attach) mechanism the device reset will be done during the (*auto_attach). To make the conversion cleaner, factor the device reset out of the (*probe). Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
When this driver is converted to the comedi (*auto_attach) mechanism the endpoint setup will be done during the (*auto_attach). To make the conversion cleaner, factor the endpoint setup out of the (*probe). Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The usb_interface * is only used in the usb (*probe) and (*disconnect). Remove the pointer to the 'interface' in the usb private data. For aesthetic reasons, rename the variable 'interface' to simply 'intf' in the (*probe) and (*disconnect). Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The analog and digital out shadow values are only used by the comedi_device. Move the variables from the usb private data to the comedi private data. Also, rename them to something a bit shorter. Move the initialization of the shadow values from the usb probe to the comedi attach. Also rename the flag used to determine the initial value from 'range_2_5' to 'is_unipolar'. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Now that the semaphore used by the comedi_driver is initialized when the comedi_device private data is allocated, the module_init() in this driver just clears the 'slot' data before calling comedi_usb_driver_register(). This static data will already be cleared when the driver is loaded. Replace the module_{init,exit}() with the module_comedi_usb_driver() macro to remove the boilerplate code. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
The semaphore in the struct slot_dt9812 is used by the comedi_driver when reading and writing to the usb device. It has no real association with the 'slot'. The 'slot' is protected with a static semaphore in the driver. Move the semaphore into the comedi_device private data and initialize it after the private data is allocated. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
For aesthetic reasons, instead of passing the 'slot' pointer, pass the comedi_device pointer to this function and rename the local var 'result' to simply 'ret'. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Only the command_{write,read} usb endpoints are used by this driver. Remove the message_pipe, and {read,write}_stream endpoint information from the usb private data. Rename the variables used for command endpoints to help keep the lines < 80 chars. Also, rename a couple of the local variables used to enumerate the endpoints to also help keep the lines < 80 chars. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
For aesthetic reasons, instead of passing the struct usb_dt9812 pointer, pass the comedi_device pointer to this function and rename the local variable 'result' to simply 'ret'. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
For aesthetic reasons, instead of passing the struct usb_dt9812 pointer, pass the comedi_device pointer to this function. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-