}
}
-static int usbdux_ai_stop(struct usbduxsub *devpriv, int do_unlink)
+static void usbdux_ai_stop(struct usbduxsub *devpriv, int do_unlink)
{
- if (!devpriv)
- return -EFAULT;
-
if (do_unlink)
usbduxsub_unlink_InURBs(devpriv);
devpriv->ai_cmd_running = 0;
-
- return 0;
}
/*
struct comedi_subdevice *s)
{
struct usbduxsub *this_usbduxsub;
- int res = 0;
/* force unlink of all urbs */
this_usbduxsub = dev->private;
return -ENODEV;
}
/* unlink only if the urb really has been submitted */
- res = usbdux_ai_stop(this_usbduxsub, this_usbduxsub->ai_cmd_running);
+ usbdux_ai_stop(this_usbduxsub, this_usbduxsub->ai_cmd_running);
up(&this_usbduxsub->sem);
- return res;
+
+ return 0;
}
/* analogue IN - interrupt service routine */
}
}
-static int usbdux_ao_stop(struct usbduxsub *devpriv, int do_unlink)
+static void usbdux_ao_stop(struct usbduxsub *devpriv, int do_unlink)
{
- if (!devpriv)
- return -EFAULT;
-
if (do_unlink)
usbduxsub_unlink_OutURBs(devpriv);
devpriv->ao_cmd_running = 0;
-
- return 0;
}
/* force unlink, is called by comedi */
struct comedi_subdevice *s)
{
struct usbduxsub *this_usbduxsub = dev->private;
- int res = 0;
if (!this_usbduxsub)
return -EFAULT;
return -ENODEV;
}
/* unlink only if it is really running */
- res = usbdux_ao_stop(this_usbduxsub, this_usbduxsub->ao_cmd_running);
+ usbdux_ao_stop(this_usbduxsub, this_usbduxsub->ao_cmd_running);
up(&this_usbduxsub->sem);
- return res;
+
+ return 0;
}
static void usbduxsub_ao_IsocIrq(struct urb *urb)
usb_kill_urb(devpriv->urbPwm);
}
-static int usbdux_pwm_stop(struct usbduxsub *devpriv, int do_unlink)
+static void usbdux_pwm_stop(struct usbduxsub *devpriv, int do_unlink)
{
- if (!devpriv)
- return -EFAULT;
-
if (do_unlink)
usbduxsub_unlink_PwmURBs(devpriv);
devpriv->pwm_cmd_running = 0;
-
- return 0;
}
/* force unlink - is called by comedi */
struct comedi_subdevice *s)
{
struct usbduxsub *this_usbduxsub = dev->private;
- int res = 0;
- /* unlink only if it is really running */
- res = usbdux_pwm_stop(this_usbduxsub, this_usbduxsub->pwm_cmd_running);
+ if (!this_usbduxsub)
+ return -EFAULT;
- res = send_dux_commands(this_usbduxsub, SENDPWMOFF);
- if (res < 0)
- return res;
+ /* unlink only if it is really running */
+ usbdux_pwm_stop(this_usbduxsub, this_usbduxsub->pwm_cmd_running);
- return res;
+ return send_dux_commands(this_usbduxsub, SENDPWMOFF);
}
static void usbduxsub_pwm_irq(struct urb *urb)