This function is only called by usbdux_ai_stop(). Absorb it. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 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 2add3ef..4d94140 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; } -- 1.8.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel