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

staging: comedi: usbduxfast: tidy up usbduxfast_ai_cancel()

Remove the unnecessary comments and dev_err() noise.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 32fa46b9
...@@ -200,23 +200,16 @@ static int usbduxfast_ai_stop(struct comedi_device *dev, int do_unlink) ...@@ -200,23 +200,16 @@ static int usbduxfast_ai_stop(struct comedi_device *dev, int do_unlink)
return 0; return 0;
} }
/*
* This will cancel a running acquisition operation.
* This is called by comedi but never from inside the driver.
*/
static int usbduxfast_ai_cancel(struct comedi_device *dev, static int usbduxfast_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s) struct comedi_subdevice *s)
{ {
struct usbduxfast_private *devpriv = dev->private; struct usbduxfast_private *devpriv = dev->private;
int ret; int ret;
/* force unlink of all urbs */ if (!devpriv)
if (!devpriv) {
dev_err(dev->class_dev, "%s: devpriv=NULL\n", __func__);
return -EFAULT; return -EFAULT;
}
down(&devpriv->sem); down(&devpriv->sem);
/* unlink */
ret = usbduxfast_ai_stop(dev, 1); ret = usbduxfast_ai_stop(dev, 1);
up(&devpriv->sem); 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