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

staging: comedi: pcl816: 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 f23068ec
...@@ -138,8 +138,6 @@ static int check_channel_list(struct comedi_device *dev, ...@@ -138,8 +138,6 @@ static int check_channel_list(struct comedi_device *dev,
static void setup_channel_list(struct comedi_device *dev, static void setup_channel_list(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
unsigned int *chanlist, unsigned int seglen); unsigned int *chanlist, unsigned int seglen);
static int pcl816_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s);
static void pcl816_start_pacer(struct comedi_device *dev, bool load_counters) static void pcl816_start_pacer(struct comedi_device *dev, bool load_counters)
{ {
...@@ -242,7 +240,7 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d) ...@@ -242,7 +240,7 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d)
if (!timeout) { /* timeout, bail error */ if (!timeout) { /* timeout, bail error */
outb(0, dev->iobase + PCL816_CLRINT); /* clear INT request */ outb(0, dev->iobase + PCL816_CLRINT); /* clear INT request */
comedi_error(dev, "A/D mode1/3 IRQ without DRDY!"); comedi_error(dev, "A/D mode1/3 IRQ without DRDY!");
pcl816_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;
...@@ -266,7 +264,7 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d) ...@@ -266,7 +264,7 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d)
/* all data sampled */ /* all data sampled */
if (devpriv->ai_act_scan >= cmd->stop_arg) { if (devpriv->ai_act_scan >= cmd->stop_arg) {
/* all data sampled */ /* all data sampled */
pcl816_ai_cancel(dev, s); s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA; s->async->events |= COMEDI_CB_EOA;
} }
comedi_event(dev, s); comedi_event(dev, s);
...@@ -306,7 +304,7 @@ static void transfer_from_dma_buf(struct comedi_device *dev, ...@@ -306,7 +304,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) {
pcl816_ai_cancel(dev, s); s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA; s->async->events |= COMEDI_CB_EOA;
s->async->events |= COMEDI_CB_BLOCK; s->async->events |= COMEDI_CB_BLOCK;
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