]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: usbduxsigma: tidy up send_dux_commands()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 23 May 2013 19:50:31 +0000 (12:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2013 11:40:52 +0000 (20:40 +0900)
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>
drivers/staging/comedi/drivers/usbduxsigma.c

index 937bcd3f86bf496d37237cc05e51cbd1bc701269..cbe8e14a4c5055367a57076dcad2371a83977883 100644 (file)
@@ -727,23 +727,17 @@ static void create_adc_command(unsigned int chan,
 #define SENDPWMON                 7
 #define SENDPWMOFF                8
 
-static int send_dux_commands(struct usbduxsigma_private *this_usbduxsub,
+static int send_dux_commands(struct usbduxsigma_private *devpriv,
                             int cmd_type)
 {
-       int result, nsent;
-
-       this_usbduxsub->dux_commands[0] = cmd_type;
-       result = usb_bulk_msg(this_usbduxsub->usbdev,
-                             usb_sndbulkpipe(this_usbduxsub->usbdev,
-                                             COMMAND_OUT_EP),
-                             this_usbduxsub->dux_commands, SIZEOFDUXBUFFER,
-                             &nsent, BULK_TIMEOUT);
-       if (result < 0)
-               dev_err(&this_usbduxsub->interface->dev, "comedi%d: "
-                       "could not transmit dux_command to the usb-device, "
-                       "err=%d\n", this_usbduxsub->comedidev->minor, result);
+       int nsent;
+
+       devpriv->dux_commands[0] = cmd_type;
 
-       return result;
+       return usb_bulk_msg(devpriv->usbdev,
+                           usb_sndbulkpipe(devpriv->usbdev, COMMAND_OUT_EP),
+                           devpriv->dux_commands, SIZEOFDUXBUFFER,
+                           &nsent, BULK_TIMEOUT);
 }
 
 static int receive_dux_commands(struct usbduxsigma_private *this_usbduxsub,