[PATCH 11/77] staging: comedi: usbduxsigma: absorb usbduxsub_unlink_OutURBs() into caller

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

 



This function is only called by usbdux_ao_stop(). Absorb it.

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 | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c
index 5f7e19d..161c912 100644
--- a/drivers/staging/comedi/drivers/usbduxsigma.c
+++ b/drivers/staging/comedi/drivers/usbduxsigma.c
@@ -424,20 +424,16 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb)
 	comedi_event(this_usbduxsub->comedidev, s);
 }
 
-static void usbduxsub_unlink_OutURBs(struct usbduxsub *devpriv)
+static void usbdux_ao_stop(struct usbduxsub *devpriv, int do_unlink)
 {
-	int i;
+	if (do_unlink) {
+		int i;
 
-	for (i = 0; i < devpriv->numOfOutBuffers; i++) {
-		if (devpriv->urbOut[i])
-			usb_kill_urb(devpriv->urbOut[i]);
+		for (i = 0; i < devpriv->numOfOutBuffers; i++) {
+			if (devpriv->urbOut[i])
+				usb_kill_urb(devpriv->urbOut[i]);
+		}
 	}
-}
-
-static void usbdux_ao_stop(struct usbduxsub *devpriv, int do_unlink)
-{
-	if (do_unlink)
-		usbduxsub_unlink_OutURBs(devpriv);
 
 	devpriv->ao_cmd_running = 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