staging: comedi: usbduxsigma: consolidate the firmware upload
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 20 May 2013 21:31:32 +0000 (14:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2013 17:59:17 +0000 (10:59 -0700)
commit1cf35b51bea0201fd4552b3d83aaef4dcecf5187
tree8571d8455b5979cc3e4c410ec65b991b73f748ad
parent41327b3e7344dadf8391549216db4e81deb32b22
staging: comedi: usbduxsigma: consolidate the firmware upload

Absorb the usbduxsub_stop(), usbduxsub_upload(), and usbduxsub_start()
functions into firmwareUpload().

Each of them just do a usb_control_msg() to the device and output
an error message if it fails. A similar message is also output by
firmware_upload() so the extra messages are redundant.

We can also share the malloc'ed local buffer needed for the
usb_control_msg().

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>
drivers/staging/comedi/drivers/usbduxsigma.c