[RFC PATCH 29/39] staging: comedi: usbduxfast: tidy up usbduxfastsub_unlink_InURBs()

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

 



Rename this function so it has namespace associated with the driver.

Remove the local variables 'j' and 'ret'. They are not used and the
function always returns '0'.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/usbduxfast.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c
index 382e43b..041fc3f 100644
--- a/drivers/staging/comedi/drivers/usbduxfast.c
+++ b/drivers/staging/comedi/drivers/usbduxfast.c
@@ -192,19 +192,16 @@ static int usbduxfast_send_cmd(struct comedi_device *dev, int cmd_type)
  * Stops the data acquision.
  * It should be safe to call this function from any context.
  */
-static int usbduxfastsub_unlink_InURBs(struct comedi_device *dev)
+static int usbduxfast_unlink_urbs(struct comedi_device *dev)
 {
 	struct usbduxfast_private *devpriv = dev->private;
-	int j = 0;
-	int err = 0;
 
 	if (devpriv && devpriv->urb) {
 		devpriv->ai_cmd_running = 0;
 		/* waits until a running transfer is over */
 		usb_kill_urb(devpriv->urb);
-		j = 0;
 	}
-	return err;
+	return 0;
 }
 
 /*
@@ -227,7 +224,7 @@ static int usbduxfast_ai_stop(struct comedi_device *dev,
 
 	if (do_unlink)
 		/* stop aquistion */
-		ret = usbduxfastsub_unlink_InURBs(dev);
+		ret = usbduxfast_unlink_urbs(dev);
 
 	return ret;
 }
-- 
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