From: H Hartley Sweeten Date: Thu, 23 May 2013 19:50:31 +0000 (-0700) Subject: staging: comedi: usbduxsigma: tidy up send_dux_commands() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=502f9a3f76637cdc9a6397c81dfe601d69de530f;p=linux-beck.git staging: comedi: usbduxsigma: tidy up send_dux_commands() 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c index 937bcd3f86bf..cbe8e14a4c50 100644 --- a/drivers/staging/comedi/drivers/usbduxsigma.c +++ b/drivers/staging/comedi/drivers/usbduxsigma.c @@ -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,