staging: comedi: pcl812: remove acl8216_ai_insn_read()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 17 Feb 2014 21:27:18 +0000 (14:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Feb 2014 19:55:31 +0000 (11:55 -0800)
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@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/pcl812.c

index c61ec5f01a6d9decef7190f4e32a7667c0cc8439..522a58772ed8affa104979bae7d13534b133c790 100644 (file)
@@ -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;