From: H Hartley Sweeten Date: Thu, 23 May 2013 19:43:07 +0000 (-0700) Subject: staging: comedi: usbduxsigma: absorb usbduxsub_unlink_InURBs() into caller X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=705a8f720154eea0c8f9801f6a9b30bbf5d7ca25;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git staging: comedi: usbduxsigma: absorb usbduxsub_unlink_InURBs() into caller This function is only called by usbdux_ai_stop(). Absorb it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c index 2add3efb4df1..4d941408cd75 100644 --- a/drivers/staging/comedi/drivers/usbduxsigma.c +++ b/drivers/staging/comedi/drivers/usbduxsigma.c @@ -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; }