]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
staging: comedi: usbduxsigma: absorb usbduxsub_unlink_InURBs() into caller
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 23 May 2013 19:43:07 +0000 (12:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2013 11:40:42 +0000 (20:40 +0900)
This function is only called by usbdux_ai_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 2add3efb4df1d57362b4c2baa00d698361100f9f..4d941408cd75fd1b203b04e1a33874d0adfbe016 100644 (file)
@@ -252,20 +252,16 @@ static struct usbduxsub usbduxsub[NUMUSBDUX];
 
 static DEFINE_SEMAPHORE(start_stop_sem);
 
-static void usbduxsub_unlink_InURBs(struct usbduxsub *devpriv)
+static void usbdux_ai_stop(struct usbduxsub *devpriv, int do_unlink)
 {
-       int i;
+       if (do_unlink) {
+               int i;
 
-       for (i = 0; i < devpriv->numOfInBuffers; i++) {
-               if (devpriv->urbIn[i])
-                       usb_kill_urb(devpriv->urbIn[i]);
+               for (i = 0; i < devpriv->numOfInBuffers; i++) {
+                       if (devpriv->urbIn[i])
+                               usb_kill_urb(devpriv->urbIn[i]);
+               }
        }
-}
-
-static void usbdux_ai_stop(struct usbduxsub *devpriv, int do_unlink)
-{
-       if (do_unlink)
-               usbduxsub_unlink_InURBs(devpriv);
 
        devpriv->ai_cmd_running = 0;
 }