Commit Graph

376876 Commits

Author SHA1 Message Date
Wei Yongjun
aba12e3fcc staging: keucr: remove needless check before usb_free_coherent()
usb_free_coherent() is safe with NULL addr and this check is
not required.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 20:46:26 +09:00
H Hartley Sweeten
31de28ab35 staging: comedi: usbduxsigma: tidy up the multi-line comments
Modify the multi-line comments to follow the CodingStyle.

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>
2013-05-30 20:41:12 +09:00
H Hartley Sweeten
57ded31567 staging: comedi: usbduxsigma: remove a space before tab
checkpatch.pl reports:

WARNING: please, no space before tabs
+^Ihigh_speed = 0; ^I/* (devpriv->high_speed) */$

Remove the space to avoid the warning.

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>
2013-05-30 20:41:11 +09:00
H Hartley Sweeten
fffe8239f5 staging: comedi: usbduxsigma: tidy up chanToInterval()
Rename the function to have namespace associated with the driver.
Rename the CamelCase parameter 'nChannels' to avoid the checkpatch.pl
warning.

Tidy up the function a bit.

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>
2013-05-30 20:41:11 +09:00
H Hartley Sweeten
7333d50b8a staging: comedi: usbduxsigma: add missing spaces reported by checkpatch.pl
checkpatch.pl reports:

ERROR: space required after that ',' (ctx:VxV)
+               dev_dbg(dev->class_dev,"CRC error in ISO IN stream\n");
                                      ^

ERROR: spaces required around that '=' (ctx:VxW)
+       struct usbduxsigma_private *devpriv= dev->private;
                                           ^
Add the missing spaces to avoid the error.

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>
2013-05-30 20:41:11 +09:00
H Hartley Sweeten
aae2f26713 staging: comedi: usbduxsigma: rename CamelCase vars in private data
Rename the CamelCase variables in the private data to avoid the
checkpatch.pl warning.

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>
2013-05-30 20:41:10 +09:00
H Hartley Sweeten
396b588579 staging: comedi: usbduxsigma: remove some unused defines
These defines are not used in the driver. 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>
2013-05-30 20:41:10 +09:00
H Hartley Sweeten
526f55a9ae staging: comedi: usbduxsigma: tidy up the usb endpoint defines
Rename the defines so they have namespace associated with the driver.
Tidy up the defines.

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>
2013-05-30 20:41:10 +09:00
H Hartley Sweeten
c2cf0cd923 staging: comedi: usbduxsigma: cleanup comedi_lrange table
Rename the table so it has namespace associated with the driver.
Tidy up the whitespace of the table.

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>
2013-05-30 20:41:10 +09:00
H Hartley Sweeten
3b081a436b staging: comedi: usbduxsigma: rename usbdux_{ai,ao}_stop() functions
Rename the functions so they have namespace associated with the driver.

For aesthetic reasons, pass the comedi_device pointer instead of the
private data pointer as the first parameter.

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>
2013-05-30 20:41:10 +09:00
H Hartley Sweeten
cca5bf1065 staging: comedi: usbduxsigma: rename the (*cancel) functions
Rename these functions so they have namespace associated with 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>
2013-05-30 20:41:09 +09:00
H Hartley Sweeten
702cd2dd4e staging: comedi: usbduxsigma: rename the urb completion handlers
Rename these functions so they have namespace associated with the
driver and their use is aparent.

Also, rename the #defines used for the bulk transfer commands and
move them up with the other defines.

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>
2013-05-30 20:41:09 +09:00
H Hartley Sweeten
2bdd6d234a staging: comedi: usbduxsigma: rename {send,receive}_dux_commands()
Rename these functions so they have namespace associated with the
driver.

Also, rename the #defines used for the bulk transfer commands and
move them up with the other defines.

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>
2013-05-30 20:41:08 +09:00
H Hartley Sweeten
dd64d1efda staging: comedi: usbduxsigma: check for invalid 'ao_timer' in all cases
Make sure to check that the 'ao_timer' value is valid for both the
high speed and low speed cases in usbduxsigma_ao_cmdtest().

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>
2013-05-30 20:41:08 +09:00
H Hartley Sweeten
b986be8527 staging: comedi: usbduxsigma: tidy up analog input command support
Rename the (*do_cmdtest) and (*do_cmd) functions so they have namespace
associated with the driver. Rename the local variable used for the
private data pointer.

Move all the command argument initialization and testing into the
(*do_cmdtest) function. That function is always called by the comedi
core before the (*do_cmd) function. The only thing the (*do_cmd) function
should have to do is setup the channel list, send the command to start
the analog input sampling, initialize the counter for the conversion,
then either read the acquisition data (submit the urbs) or set the
trigger to read the data later.

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>
2013-05-30 20:41:08 +09:00
H Hartley Sweeten
c5db3b755c staging: comedi: usbduxsigma: tidy up usbdux_ai_insn_read()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.

Return -EBUSY if an asynchronous command is running and the read cannot
be completed.

Propagate the errno if the receive_dux_command() fails.

Tidy up the function to make it more concise.

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>
2013-05-30 20:41:07 +09:00
H Hartley Sweeten
44d3fcaece staging: comedi: usbduxsigma: cleanup the private data 'outBuffer'
This buffer is used to cache the analog output values that are written
to the analog output channels. Currently it only caches the single
writes to the channels using the (*insn_write) callback. The async
command writes are not cached. The buffer is also being kzalloc'ed
during the attach of the driver to a size much larger that required.

Rename the CamelCase buffer and change it to an array in the private
data of the correct size to cache the analog output channel values.

Modify the analog output urb callback so it updates the cached values
with those used for the asynchronous command to allow readback after
the command completes.

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>
2013-05-30 20:41:07 +09:00
H Hartley Sweeten
2dd87acb1a staging: comedi: usbduxsigma: tidy up analog output (*insn_{read, write})
Rename the functions so they have namespace associated with the driver.
Rename the local variable used for the private data pointer.

Return -EBUSY from the (*insn_write) function if an asynchronous command
is running that the write cannot be completed.

Don't save the cached value of the analog output for readback unless
the command to set it is successful.

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>
2013-05-30 20:41:07 +09:00
H Hartley Sweeten
fb1ef622e7 staging: comedi: usbduxsigma: tidy up analog output command support
Rename the (*do_cmdtest) and (*do_cmd) functions so they have namespace
associated with the driver. Rename the local variable used for the
private data pointer.

Move all the command argument initialization and testing into the
(*do_cmdtest) function. That function is always called by the comedi
core before the (*do_cmd) function. The only thing the (*do_cmd) function
should have to do is setup the channel list, initialize the counter for
the conversion, then either start the conversion (submit the urbs) or
set the trigger to start the conversion.

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>
2013-05-30 20:41:06 +09:00
H Hartley Sweeten
8cd6f5ebb6 staging: comedi: usbduxsigma: rename usbdux_pwm_stop()
Rename the function so it has namespace associated with the driver.

For aesthetic reasons, pass the comedi_device pointer instead of the
private data pointer as the first parameter.

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>
2013-05-30 20:41:06 +09:00
H Hartley Sweeten
fd245192b1 staging: comedi: usbduxsigma: rename usbdux_pwm_cancel()
Rename the function so it has namespace associated with 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>
2013-05-30 20:41:06 +09:00
H Hartley Sweeten
aff4dd068c staging: comedi: usbduxsigma: rename usbdux_pwm_irq()
Rename the function so it has namespace associated with 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>
2013-05-30 20:41:05 +09:00
H Hartley Sweeten
440b2168ae staging: comedi: usbduxsigma: tidy up usbdux_pwm_period()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.

Modify the fx2delay calculation to remove the floating point 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>
2013-05-30 20:41:05 +09:00
H Hartley Sweeten
cf9b463401 staging: comedi: usbduxsigma: change private data flags to bit fields
Change the type of all the true/false flags in the private data to
bit fields.

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>
2013-05-30 20:41:04 +09:00
H Hartley Sweeten
92ba10e1a1 staging: comedi: usbduxsigma: remove 'interface' from the private data
This back pointer to the usb_interface is not used, 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>
2013-05-30 20:41:04 +09:00
H Hartley Sweeten
38f4e42153 staging: comedi: usbduxsigma: remove some dev_{level} noise
Remove the dev_err() and dev_dbg() messages that are just kernel
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>
2013-05-30 20:41:04 +09:00
H Hartley Sweeten
62f85edb3d staging: comedi: usbduxsigma: tidy up usbdux_dio_insn_config()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.
Add a local variable for the channel mask.

Remove the unnecessary comments and clean up the multi-line comment
at the end.

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>
2013-05-30 20:41:03 +09:00
H Hartley Sweeten
77a52e69cb staging: comedi: usbduxsigma: tidy up usbdux_dio_insn_bits()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.
Remove the unnecessary casts.

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>
2013-05-30 20:41:03 +09:00
H Hartley Sweeten
a65b091554 staging: comedi: usbduxsigma: tidy up usbdux_pwm_start()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.

Remove the unnecessary cast of the pwm delay.

Use memset to initialize the buffer instead of the for loop.

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>
2013-05-30 20:41:03 +09:00
H Hartley Sweeten
ab58a6e35d staging: comedi: usbduxsigma: tidy up usbdux_pwm_pattern()
Rename the function so it has namespace associated with the driver.

Tidy up the function to make it more concise.

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>
2013-05-30 20:41:02 +09:00
H Hartley Sweeten
4ced8c641e staging: comedi: usbduxsigma: tidy up usbdux_pwm_write()
Rename the function so it has namespace associated with the driver.

Tidy up the 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>
2013-05-30 20:41:01 +09:00
H Hartley Sweeten
92f687ba5e staging: comedi: usbduxsigma: remove usbdux_pwm_read()
The comment says its not needed, just 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>
2013-05-30 20:41:01 +09:00
H Hartley Sweeten
8939787fe0 staging: comedi: usbduxsigma: tidy up usbduxsigma_pwm_config()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.

Remove some unnecessary comments and tidy up the comment about the
parameters for the INSN_CONFIG_PWM_SET_H_BRIDGE instruction.

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>
2013-05-30 20:41:00 +09:00
H Hartley Sweeten
46c878080b staging: comedi: usbduxsigma: move usbduxsigma_firmware_upload()
For aesthetics, move this function near its caller. Also, move the
FIRMWARE_MAX_LEN define so its with the other firmware constants
and fix the whitespace.

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>
2013-05-30 20:41:00 +09:00
H Hartley Sweeten
5f1d72ecfb staging: comedi: usbduxsigma: remove an extra ';'
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>
2013-05-30 20:40:59 +09:00
H Hartley Sweeten
e0b12e6e9a staging: comedi: usbduxsigma: tidy up tidy_up()
Rename the function so it has namespace associated with the driver.

For aesthetic reasons, move the function so it's near the one that
allocates the usb buffers.

Tidy up the function so it frees the buffers in the opposite order
they were allocated. Also remove the = NULL for all the buffers,
the driver is being detached so the comedi core will kfree the
private data.

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>
2013-05-30 20:40:58 +09:00
H Hartley Sweeten
988f5541db staging: comedi: usbduxsigma: kill all urbs before freeing them
For aesthetic reasons, kill all the urbs before freeing them.
Also, remove a redundant killing of the ai and ao urbs in the
(*detach).

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>
2013-05-30 20:40:58 +09:00
H Hartley Sweeten
137beb77c7 staging: comedi: usbduxsigma: move usb_set_intfdata(intf, NULL) to (*detach)
For aesthetic reasons, move the clearing of the interface data to
the (*detach) since its set in the (*auto_attach).

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>
2013-05-30 20:40:58 +09:00
H Hartley Sweeten
1fc56e86e4 staging: comedi: usbduxsigma: remove tidy_up() from (*auto_attach)
Comedi drivers do not need to cleanup allocations during the
(*auto_attach). If the (*auto_attach) fails the (*detach) will
automatically be called to handle the cleanup.

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>
2013-05-30 20:40:57 +09:00
H Hartley Sweeten
9838f532dc staging: comedi: usbduxsigma: tidy up usbdux_getstatusinfo()
Rename the function so it has namespace associated with the driver.

Move the function closer to its only caller and tidy it up a bit.

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>
2013-05-30 20:40:57 +09:00
H Hartley Sweeten
78f48506f5 staging: comedi: usbduxsigma: tidy up usbduxsigma_attach_common()
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>
2013-05-30 20:40:56 +09:00
H Hartley Sweeten
af87e18890 staging: comedi: usbduxsigma: remove SUBDEV_* defines
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>
2013-05-30 20:40:56 +09:00
H Hartley Sweeten
982d255b3e staging: comedi: usbduxsigma: remove unnecessary check in usbdux_ao_cmd()
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>
2013-05-30 20:40:55 +09:00
H Hartley Sweeten
01a4303d39 staging: comedi: usbduxsigma: remove unnecessary check in usbdux_ai_cmd()
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>
2013-05-30 20:40:54 +09:00
H Hartley Sweeten
8eea6dbd73 staging: comedi: usbduxsigma: tidy up usbdux_ai_inttrig()
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>
2013-05-30 20:40:54 +09:00
H Hartley Sweeten
2d4462d28a staging: comedi: usbduxsigma: tidy up usbdux_ao_inttrig()
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>
2013-05-30 20:40:54 +09:00
H Hartley Sweeten
edd2d33ee8 staging: comedi: usbduxsigma: remove private data sanity checks
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>
2013-05-30 20:40:54 +09:00
H Hartley Sweeten
2a8cdc6861 staging: comedi: usbduxsigma: tidy up firmware upload error messages
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>
2013-05-30 20:40:53 +09:00
H Hartley Sweeten
a59a28a32f staging: comedi: usbduxsigma: remove 'usbdev' from the private data
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>
2013-05-30 20:40:53 +09:00
H Hartley Sweeten
f62024e5ae staging: comedi: usbduxsigma: remove 'comedidev' from the private data
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>
2013-05-30 20:40:53 +09:00