提交 cb8c0034 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

staging: comedi: usbduxfast: tidy up usbduxfastsub_unlink_InURBs()

Rename this function so it has namespace associated with the driver.

Remove the local variables 'j' and 'ret'. They are not used and the
function always returns '0'.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 665ff8d3
...@@ -189,19 +189,16 @@ static int usbduxfast_send_cmd(struct comedi_device *dev, int cmd_type) ...@@ -189,19 +189,16 @@ static int usbduxfast_send_cmd(struct comedi_device *dev, int cmd_type)
* Stops the data acquision. * Stops the data acquision.
* It should be safe to call this function from any context. * It should be safe to call this function from any context.
*/ */
static int usbduxfastsub_unlink_InURBs(struct comedi_device *dev) static int usbduxfast_unlink_urbs(struct comedi_device *dev)
{ {
struct usbduxfast_private *devpriv = dev->private; struct usbduxfast_private *devpriv = dev->private;
int j = 0;
int err = 0;
if (devpriv && devpriv->urb) { if (devpriv && devpriv->urb) {
devpriv->ai_cmd_running = 0; devpriv->ai_cmd_running = 0;
/* waits until a running transfer is over */ /* waits until a running transfer is over */
usb_kill_urb(devpriv->urb); usb_kill_urb(devpriv->urb);
j = 0;
} }
return err; return 0;
} }
/* /*
...@@ -224,7 +221,7 @@ static int usbduxfast_ai_stop(struct comedi_device *dev, ...@@ -224,7 +221,7 @@ static int usbduxfast_ai_stop(struct comedi_device *dev,
if (do_unlink) if (do_unlink)
/* stop aquistion */ /* stop aquistion */
ret = usbduxfastsub_unlink_InURBs(dev); ret = usbduxfast_unlink_urbs(dev);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册