Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afa876b9 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: pcl812: remove acl8216_ai_insn_read()



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: 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 4af1eb3e
Loading
Loading
Loading
Loading
+1 −31
Original line number Diff line number Diff line
@@ -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,9 +1408,6 @@ 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;

	if (dev->irq) {