Use the subdevice (*cancel) operation to remove the need for a forward declaration. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/pcl816.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index 6cd7154..a22ea31 100644 --- a/drivers/staging/comedi/drivers/pcl816.c +++ b/drivers/staging/comedi/drivers/pcl816.c @@ -135,8 +135,6 @@ static int check_channel_list(struct comedi_device *dev, static void setup_channel_list(struct comedi_device *dev, struct comedi_subdevice *s, 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) { @@ -239,7 +237,7 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d) if (!timeout) { /* timeout, bail error */ outb(0, dev->iobase + PCL816_CLRINT); /* clear INT request */ 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; comedi_event(dev, s); return IRQ_HANDLED; @@ -263,7 +261,7 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d) /* all data sampled */ if (devpriv->ai_act_scan >= cmd->stop_arg) { /* all data sampled */ - pcl816_ai_cancel(dev, s); + s->cancel(dev, s); s->async->events |= COMEDI_CB_EOA; } comedi_event(dev, s); @@ -303,7 +301,7 @@ static void transfer_from_dma_buf(struct comedi_device *dev, if (!devpriv->ai_neverending) /* all data sampled */ 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_BLOCK; break; -- 1.8.5.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel