From 0c32b57e77106406c202a1e5e73b985d950db196 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Thu, 23 May 2013 12:43:57 -0700 Subject: [PATCH] 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 --- 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 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; } -- 2.20.1