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

staging: comedi: usbdux: use the stop helpers in the detach

Use the stop helpers instead of duplicating the code in the 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 3c50bbb7
......@@ -1941,12 +1941,10 @@ static void usbdux_detach(struct comedi_device *dev)
usb_set_intfdata(intf, NULL);
if (devpriv->pwm_cmd_running)
usbduxsub_unlink_pwm_urbs(dev);
if (devpriv->ao_cmd_running)
usbduxsub_unlink_outurbs(dev);
if (devpriv->ai_cmd_running)
usbduxsub_unlink_inurbs(dev);
/* stop and unlink any submitted urbs */
usbdux_pwm_stop(dev, devpriv->pwm_cmd_running);
usbdux_ao_stop(dev, devpriv->ao_cmd_running);
usbdux_ai_stop(dev, devpriv->ai_cmd_running);
usbdux_free_usb_buffers(devpriv);
......
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