[PATCH 66/87] staging: comedi: pcl812: use subdevice (*cancel)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/pcl812.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c
index 0d7d3ae..d0708f8 100644
--- a/drivers/staging/comedi/drivers/pcl812.c
+++ b/drivers/staging/comedi/drivers/pcl812.c
@@ -536,8 +536,6 @@ struct pcl812_private {
 static void setup_range_channel(struct comedi_device *dev,
 				struct comedi_subdevice *s,
 				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)
 {
@@ -911,7 +909,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
 
 	if (err) {
 		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;
 		comedi_event(dev, s);
 		return IRQ_HANDLED;
@@ -935,7 +933,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
 		if (!(devpriv->ai_neverending))
 							/* all data sampled */
 			if (devpriv->ai_act_scan >= cmd->stop_arg) {
-				pcl812_ai_cancel(dev, s);
+				s->cancel(dev, s);
 				s->async->events |= COMEDI_CB_EOA;
 			}
 	}
@@ -968,7 +966,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) {
-					pcl812_ai_cancel(dev, s);
+					s->cancel(dev, s);
 					s->async->events |= COMEDI_CB_EOA;
 					break;
 				}
-- 
1.8.5.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux