staging: comedi: usbduxsigma: absorb usbduxsub_unlink_OutURBs() into caller
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 23 May 2013 19:43:57 +0000 (12:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2013 11:40:43 +0000 (20:40 +0900)
This function is only called by usbdux_ao_stop(). Absorb it.

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 5f7e19d9ec88025e209775f57901abc82778a5cf..161c912745498ba3ce0946dca3307c055352e352 100644 (file)
@@ -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;
 }