[PATCH 04/77] staging: comedi: usbduxsigma: cleanup the stop functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/usbduxsigma.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c
index e284572..59f461d 100644
--- a/drivers/staging/comedi/drivers/usbduxsigma.c
+++ b/drivers/staging/comedi/drivers/usbduxsigma.c
@@ -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;
 }
-- 
1.8.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux