mirror of https://gitee.com/openkylin/linux.git
staging: comedi: usbduxsigma: rename usbdux_pwm_stop()
Rename the function so it has namespace associated with the driver. For aesthetic reasons, pass the comedi_device pointer instead of the private data pointer as the first parameter. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fd245192b1
commit
8cd6f5ebb6
|
@ -1147,8 +1147,10 @@ static int usbduxsigma_dio_insn_bits(struct comedi_device *dev,
|
||||||
return ret;
|
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 (do_unlink) {
|
||||||
if (devpriv->urbPwm)
|
if (devpriv->urbPwm)
|
||||||
usb_kill_urb(devpriv->urbPwm);
|
usb_kill_urb(devpriv->urbPwm);
|
||||||
|
@ -1163,7 +1165,7 @@ static int usbduxsigma_pwm_cancel(struct comedi_device *dev,
|
||||||
struct usbduxsigma_private *devpriv = dev->private;
|
struct usbduxsigma_private *devpriv = dev->private;
|
||||||
|
|
||||||
/* unlink only if it is really running */
|
/* 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);
|
return send_dux_commands(dev, SENDPWMOFF);
|
||||||
}
|
}
|
||||||
|
@ -1185,7 +1187,7 @@ static void usbduxsigma_pwm_irq(struct urb *urb)
|
||||||
case -ECONNABORTED:
|
case -ECONNABORTED:
|
||||||
/* happens after an unlink command */
|
/* happens after an unlink command */
|
||||||
if (devpriv->pwm_cmd_running)
|
if (devpriv->pwm_cmd_running)
|
||||||
usbdux_pwm_stop(devpriv, 0); /* w/o unlink */
|
usbduxsigma_pwm_stop(dev, 0); /* w/o unlink */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1194,7 +1196,7 @@ static void usbduxsigma_pwm_irq(struct urb *urb)
|
||||||
dev_err(dev->class_dev,
|
dev_err(dev->class_dev,
|
||||||
"%s: non-zero urb status (%d)\n",
|
"%s: non-zero urb status (%d)\n",
|
||||||
__func__, urb->status);
|
__func__, urb->status);
|
||||||
usbdux_pwm_stop(devpriv, 0); /* w/o unlink */
|
usbduxsigma_pwm_stop(dev, 0); /* w/o unlink */
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1212,7 +1214,7 @@ static void usbduxsigma_pwm_irq(struct urb *urb)
|
||||||
if (ret == EL2NSYNC)
|
if (ret == EL2NSYNC)
|
||||||
dev_err(dev->class_dev,
|
dev_err(dev->class_dev,
|
||||||
"buggy USB host controller or bug in IRQ handler\n");
|
"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 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1665,7 +1667,7 @@ static void usbduxsigma_free_usb_buffers(struct comedi_device *dev)
|
||||||
/* force unlink all urbs */
|
/* force unlink all urbs */
|
||||||
usbdux_ai_stop(devpriv, 1);
|
usbdux_ai_stop(devpriv, 1);
|
||||||
usbdux_ao_stop(devpriv, 1);
|
usbdux_ao_stop(devpriv, 1);
|
||||||
usbdux_pwm_stop(devpriv, 1);
|
usbduxsigma_pwm_stop(dev, 1);
|
||||||
|
|
||||||
urb = devpriv->urbPwm;
|
urb = devpriv->urbPwm;
|
||||||
if (urb) {
|
if (urb) {
|
||||||
|
|
Loading…
Reference in New Issue