Skip to content

Commit

Permalink
staging: comedi: usbdux: use the stop helpers in the detach
Browse files Browse the repository at this point in the history
Use the stop helpers instead of duplicating the code in the detach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 26, 2013
1 parent 3c50bbb commit ecc2b22
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/staging/comedi/drivers/usbdux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ecc2b22

Please sign in to comment.