From: H Hartley Sweeten Date: Thu, 23 May 2013 19:43:57 +0000 (-0700) Subject: staging: comedi: usbduxsigma: absorb usbduxsub_unlink_OutURBs() into caller X-Git-Tag: firefly_0821_release~176^2~5845^2~476 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0c32b57e77106406c202a1e5e73b985d950db196;p=firefly-linux-kernel-4.4.55.git staging: comedi: usbduxsigma: absorb usbduxsub_unlink_OutURBs() into caller This function is only called by usbdux_ao_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 5f7e19d9ec88..161c91274549 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; }