[PATCH 44/87] staging: comedi: pcl812: remove acl8216_ai_insn_read()

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

 



This (*insn_read) function was used to read 16-bit analog input data
from the boardACL8216 boardtypes. The 12/16-bit differences are now
handled by the pcl812_ai_eoc() and pcl812_ai_get_sample() helpers.

Remove this function and use pcl812_ai_insn_read() for all boardtypes.

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 | 32 +-------------------------------
 1 file changed, 1 insertion(+), 31 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c
index c61ec5f..522a587 100644
--- a/drivers/staging/comedi/drivers/pcl812.c
+++ b/drivers/staging/comedi/drivers/pcl812.c
@@ -608,33 +608,6 @@ static int pcl812_ai_insn_read(struct comedi_device *dev,
 	return ret ? ret : n;
 }
 
-static int acl8216_ai_insn_read(struct comedi_device *dev,
-				struct comedi_subdevice *s,
-				struct comedi_insn *insn, unsigned int *data)
-{
-	int ret = 0;
-	int n;
-
-	/* select software trigger */
-	outb(1, dev->iobase + PCL812_MODE);
-	/*  select channel and renge */
-	setup_range_channel(dev, s, insn->chanspec, 1);
-	for (n = 0; n < insn->n; n++) {
-		/* start conversion */
-		outb(255, dev->iobase + PCL812_SOFTTRIG);
-		udelay(5);
-
-		ret = comedi_timeout(dev, s, insn, pcl812_ai_eoc, 0);
-		if (ret)
-			break;
-
-		data[n] = pcl812_ai_get_sample(dev, s);
-	}
-	outb(0, dev->iobase + PCL812_MODE);
-
-	return ret ? ret : n;
-}
-
 /*
 ==============================================================================
 */
@@ -1435,10 +1408,7 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
 	pcl812_set_ai_range_table(dev, s, it);
 
-	if (board->board_type == boardACL8216)
-		s->insn_read	= acl8216_ai_insn_read;
-	else
-		s->insn_read	= pcl812_ai_insn_read;
+	s->insn_read	= pcl812_ai_insn_read;
 
 	if (dev->irq) {
 		dev->read_subdev = s;
-- 
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