Commit 71d7e1ee authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: usbduxsigma: move urb unlink into usbduxsigma_detach()

For aesthetics, move the final force unlink of the urbs from
usbduxsigma_free_usb_buffers() to usbduxsigma_detach().
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1c379e94
......@@ -1621,11 +1621,6 @@ static void usbduxsigma_free_usb_buffers(struct comedi_device *dev)
struct urb *urb;
int i;
/* force unlink all urbs */
usbduxsigma_ai_stop(dev, 1);
usbduxsigma_ao_stop(dev, 1);
usbduxsigma_pwm_stop(dev, 1);
urb = devpriv->pwm_urb;
if (urb) {
kfree(urb->transfer_buffer);
......@@ -1714,7 +1709,14 @@ static void usbduxsigma_detach(struct comedi_device *dev)
usb_set_intfdata(intf, NULL);
down(&devpriv->sem);
/* force unlink all urbs */
usbduxsigma_ai_stop(dev, 1);
usbduxsigma_ao_stop(dev, 1);
usbduxsigma_pwm_stop(dev, 1);
usbduxsigma_free_usb_buffers(dev);
up(&devpriv->sem);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment