- 30 May, 2013 38 commits
-
-
H Hartley Sweeten authored
Rename the local variable used for the comedi_device private data. Remove all the unnecessary comments and add some whitespace to the subdevice init. Use dev->class_dev for the dev_{level} messages. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The SUBDEV_* defines are only used during the (*auto_attach). Remove the defines and just open code the values. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The comedi core verifies that the command chanlist_len is valid for the subdevice based on the len_chanlist that was setup during the attach. There is no need to recheck it in the (*cmd) function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The comedi core verifies that the command chanlist_len is valid for the subdevice based on the len_chanlist that was setup during the attach. There is no need to recheck it in the (*cmd) function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Rename the function so it has namespace associated with the driver. Rename the local variable used for the private data pointer. Remove the dev_err() messages, they are just added noise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Rename the function so it has namespace associated with the driver. Rename the local variable used for the private data pointer. Remove the dev_err() messages, they are just added noise. Refactor the code to remove the goto. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The comedi functions in this driver can only be called if the (*auto_attach) successfull kzalloc'ed the private data and set dev->private. The extra sanity checks are not needed. Remove them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Use dev->class_dev for all dev_{level} messages. Remove the unnecessary error message for a kmemdup() failure. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
This back pointer to the usb_device is not needed in the private data. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
This back pointer to the comedi_device is not needed in the private data. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Rename the CamelCase function. Pass the comedi_device pointer instead of the private data pointer to the function. Use a couple local variables to tidy up the function. Remove the dev_err() message when usb_submit_urb() fails, its just added noise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Rename the variable used for the private data pointer. Remove dev_err() when usb_blk_msg() fails, it's just added noise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Rename the variable used for the private data pointer. Remove dev_err() when usb_blk_msg() fails, it's just added noise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
This define enables a bunch of printk debug in send_dux_commands(). This is just noise used for development debuging. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The usb_driver (*probe) already calls comedi_usb_auto_config(), which will call the comedi_driver (*auto_attach). Move the bulk of the (*probe) to the (*auto_attach). This allows the comedi_device private data to be kzalloc'ed and the static array used to pass the private data from the usb_driver to the comedi_driver can be removed along with the static semaphore that protected it. We can also drop a couple variables from the private data since they no longer are used or needed. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The usb_driver (*disconnect) already calls comedi_usb_auto_unconfig(), which will call the comedi_driver (*detach). Move the other operations in the (*disconnect) into the (*detach). The comedi_usb_auto_unconfig() can then be used directly for the (*disconnect). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
To make pushing the usb_driver (*probe) into the comedi_driver (*auto_attach) cleaner, factor the usb buffer allocation out of the (*probe). This also cleans up the failure paths in the (*probe). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
For aesthetic reasons, rename some of the variables to the "norm" used in comedi drivers. Use a local variable for the pointer to the private data instead of accessing the static array directly. Also use a local variable to setup the urbs. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
For aesthetic reasons, rename the struct used for the comedi_device private data from usbduxsub to usbduxsigma_private. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Rename the local variables to follow the "norm" for comedi drivers. The comedi_subdevice is not used in this function. Remove that local variable. Use dev->class_dev for any dev_{level} messages. Remove the extra check of 'pwm_cmd_running' before submitting the urb. This flag was previously checked. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The 'probed' flag in the private data is used by the usb_driver (*probe) function to find a free entry in the static usbduxsub array to use for the comedi_device private data. The (*probe) sets this flag before it hands off the probe to the comedi_driver (*auto_attach). The 'probed' flag is cleared in tidy_up() are part of the usb_driver (*disconnect), which calls the comedi_driver (*detach). The 'probed' flag will always be set if the comedi_driver (*auto_attach) completes successfully. The extra sanity checks in the comedi functions are not needed. Remove them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Generalize a helper function to replace usbduxsub_submit_{In,Out}URBs(). In the callers, set the 'a[io]_cmd_running' flag after the urbs have been successfully submitted. This removes the need to clear the flag if the submit fails. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The usbduxsub_submit_{In,Out}URBs() functions have a couple development debug messages that are just added noise. Remove them. Also, the sanity check of 'usbduxsub', the comedi_device private data, is not necessary. The callers have already validated it. Remove the checks. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Rename the local variables to follow the "norm" for comedi drivers. The comedi_subdevice for this function is the dev->write_subdev that was initialized during the (*auto_attach), use that instead of directly accessing the comedi_device subdevices array. Use dev->class_dev for any dev_{level} messages. Remove the extra check of 'ao_cmd_running' before submitting the urb. This flag was previously checked and if the command is aborted due to an usbdux_ao_stop() before reaching this point the function will exit. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Rename the local variables to follow the "norm" for comedi drivers. The comedi_subdevice for this function is the dev->read_subdev that was initialized during the (*auto_attach), use that instead of directly accessing the comedi_device subdevices array. Use dev->class_dev for any dev_{level} messages. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
This function is only called by usbdux_pwm_stop(). Absorb it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
In tidy_up(), instead of duplicating the code in usbdux_pwm_stop() to unlink the pwm urb, just use usbdux_pwm_stop(). Since that function calls usb_kill_urb() and clears the 'pwm_cmd_running' flag, we can also remove the redundant code in tidy_up(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
This function is only called by usbdux_ao_stop(). Absorb it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
In tidy_up(), instead of duplicating the code in usbdux_ao_stop() to unlink all the output urbs, just use usbdux_ao_stop(). Since that function calls usb_kill_urb() for all the urbs and clears the 'ao_cmd_running' flag, we can also remove the redundant code in tidy_up(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
This function is only called by usbdux_ai_stop(). Absorb it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
In tidy_up(), instead of duplicating the code in usbdux_ai_stop() to unlink all the input urbs, just use usbdux_ai_stop(). Since that function calls usb_kill_urb() for all the urbs and clears the 'ai_cmd_running' flag, we can also remove the redundant code in tidy_up(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The (*cancel) functions can only be called by the comedi core it the (*auto_attach) completed successfully. That function sets the comedi_device 'private' variable before initializing the callbacks so the sanity checks are unnecessary. Remove them. Also, rename the 'this_usbduxsub' local variable to 'devpriv' as this is more common in comedi drivers. Remove the unnecessary comments. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The comedi_device private data variable 'probed' is set after the usb_driver has completed its (*probe) before calling comedi_usb_auto_config(). That function calls the comedi_driver (*auto_attach) which will set the comedi_device 'private' variable and initialize the subdevices. The subdevice (*cancel) functions can only be called after the (*auto_attach) has completed successfully so the sanity checks of 'probed' are unnecessary. Remove them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The usbdux_pwm_cancel() function is the only caller that does not validate the comedi_device private data before calling the stop function. Move the validation test to that function and remove the unnecessary sanity checks. Since the stop functions always succeed, change the return type to void. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The 'this_usbduxsub' parameter is actually the comedi_device private data, rename it to 'devpriv' which is more common in comedi drivers. Remove the unnecessary pr_err() noise in usbdux_ai_stop(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
These functions always return success. Change them to just return void. The 'usbduxsub_tmp', which is actually the comedi_device private data, is already validated by the callers. Remove the unnecessary validation and rename the 'usbduxsub_tmp' parameter to 'devpriv' which is more common in comedi drivers. Remove the unnecessary comments. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Remove the dev_dbg() messages in all the unlink urb functions. The 'err' is always 0 (success) so these messages are just added noise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Remove all the dev_{level} function trace noise in the driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 27 May, 2013 1 commit
-
-
Greg Kroah-Hartman authored
We want the changes here, and we resolve the merge conflict that was happening in the nvec_kbd.c file. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 26 May, 2013 1 commit
-
-
Linus Torvalds authored
-