return ret;
}
-static void usbdux_pwm_stop(struct usbduxsigma_private *devpriv, int do_unlink)
+static void usbduxsigma_pwm_stop(struct comedi_device *dev, int do_unlink)
{
+ struct usbduxsigma_private *devpriv = dev->private;
+
if (do_unlink) {
if (devpriv->urbPwm)
usb_kill_urb(devpriv->urbPwm);
struct usbduxsigma_private *devpriv = dev->private;
/* unlink only if it is really running */
- usbdux_pwm_stop(devpriv, devpriv->pwm_cmd_running);
+ usbduxsigma_pwm_stop(dev, devpriv->pwm_cmd_running);
return send_dux_commands(dev, SENDPWMOFF);
}
case -ECONNABORTED:
/* happens after an unlink command */
if (devpriv->pwm_cmd_running)
- usbdux_pwm_stop(devpriv, 0); /* w/o unlink */
+ usbduxsigma_pwm_stop(dev, 0); /* w/o unlink */
return;
default:
dev_err(dev->class_dev,
"%s: non-zero urb status (%d)\n",
__func__, urb->status);
- usbdux_pwm_stop(devpriv, 0); /* w/o unlink */
+ usbduxsigma_pwm_stop(dev, 0); /* w/o unlink */
}
return;
}
if (ret == EL2NSYNC)
dev_err(dev->class_dev,
"buggy USB host controller or bug in IRQ handler\n");
- usbdux_pwm_stop(devpriv, 0); /* w/o unlink */
+ usbduxsigma_pwm_stop(dev, 0); /* w/o unlink */
}
}
/* force unlink all urbs */
usbdux_ai_stop(devpriv, 1);
usbdux_ao_stop(devpriv, 1);
- usbdux_pwm_stop(devpriv, 1);
+ usbduxsigma_pwm_stop(dev, 1);
urb = devpriv->urbPwm;
if (urb) {