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

staging: comedi: pcl812: use subdevice (*cancel)

Use the subdevice (*cancel) operation to remove the need for a forward
declaration.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f4985a79
...@@ -536,8 +536,6 @@ struct pcl812_private { ...@@ -536,8 +536,6 @@ struct pcl812_private {
static void setup_range_channel(struct comedi_device *dev, static void setup_range_channel(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
unsigned int rangechan, char wait); unsigned int rangechan, char wait);
static int pcl812_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s);
static void pcl812_start_pacer(struct comedi_device *dev, bool load_timers) static void pcl812_start_pacer(struct comedi_device *dev, bool load_timers)
{ {
...@@ -911,7 +909,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d) ...@@ -911,7 +909,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
if (err) { if (err) {
dev_dbg(dev->class_dev, "A/D cmd IRQ without DRDY!\n"); dev_dbg(dev->class_dev, "A/D cmd IRQ without DRDY!\n");
pcl812_ai_cancel(dev, s); s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR; s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
comedi_event(dev, s); comedi_event(dev, s);
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -935,7 +933,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d) ...@@ -935,7 +933,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
if (!(devpriv->ai_neverending)) if (!(devpriv->ai_neverending))
/* all data sampled */ /* all data sampled */
if (devpriv->ai_act_scan >= cmd->stop_arg) { if (devpriv->ai_act_scan >= cmd->stop_arg) {
pcl812_ai_cancel(dev, s); s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA; s->async->events |= COMEDI_CB_EOA;
} }
} }
...@@ -968,7 +966,7 @@ static void transfer_from_dma_buf(struct comedi_device *dev, ...@@ -968,7 +966,7 @@ static void transfer_from_dma_buf(struct comedi_device *dev,
if (!devpriv->ai_neverending) if (!devpriv->ai_neverending)
/* all data sampled */ /* all data sampled */
if (devpriv->ai_act_scan >= cmd->stop_arg) { if (devpriv->ai_act_scan >= cmd->stop_arg) {
pcl812_ai_cancel(dev, s); s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA; s->async->events |= COMEDI_CB_EOA;
break; break;
} }
......
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