staging: comedi: usbduxsigma: cleanup the stop functions
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 23 May 2013 19:40:10 +0000 (12:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2013 11:40:39 +0000 (20:40 +0900)
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>
drivers/staging/comedi/drivers/usbduxsigma.c

index e28457205f94bf30d304433f0242d2d92266297b..59f461df675d9eed554dcc9555b48b03cf074da1 100644 (file)
@@ -262,17 +262,15 @@ static void usbduxsub_unlink_InURBs(struct usbduxsub *devpriv)
        }
 }
 
-static int usbdux_ai_stop(struct usbduxsub *this_usbduxsub, int do_unlink)
+static int usbdux_ai_stop(struct usbduxsub *devpriv, int do_unlink)
 {
-       if (!this_usbduxsub) {
-               pr_err("comedi?: usbdux_ai_stop: this_usbduxsub=NULL!\n");
+       if (!devpriv)
                return -EFAULT;
-       }
 
        if (do_unlink)
-               usbduxsub_unlink_InURBs(this_usbduxsub);
+               usbduxsub_unlink_InURBs(devpriv);
 
-       this_usbduxsub->ai_cmd_running = 0;
+       devpriv->ai_cmd_running = 0;
 
        return 0;
 }
@@ -459,15 +457,15 @@ static void usbduxsub_unlink_OutURBs(struct usbduxsub *devpriv)
        }
 }
 
-static int usbdux_ao_stop(struct usbduxsub *this_usbduxsub, int do_unlink)
+static int usbdux_ao_stop(struct usbduxsub *devpriv, int do_unlink)
 {
-       if (!this_usbduxsub)
+       if (!devpriv)
                return -EFAULT;
 
        if (do_unlink)
-               usbduxsub_unlink_OutURBs(this_usbduxsub);
+               usbduxsub_unlink_OutURBs(devpriv);
 
-       this_usbduxsub->ao_cmd_running = 0;
+       devpriv->ao_cmd_running = 0;
 
        return 0;
 }
@@ -1639,15 +1637,15 @@ static void usbduxsub_unlink_PwmURBs(struct usbduxsub *devpriv)
                usb_kill_urb(devpriv->urbPwm);
 }
 
-static int usbdux_pwm_stop(struct usbduxsub *this_usbduxsub, int do_unlink)
+static int usbdux_pwm_stop(struct usbduxsub *devpriv, int do_unlink)
 {
-       if (!this_usbduxsub)
+       if (!devpriv)
                return -EFAULT;
 
        if (do_unlink)
-               usbduxsub_unlink_PwmURBs(this_usbduxsub);
+               usbduxsub_unlink_PwmURBs(devpriv);
 
-       this_usbduxsub->pwm_cmd_running = 0;
+       devpriv->pwm_cmd_running = 0;
 
        return 0;
 }