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

Commit e69ad291 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

staging: comedi: amplc_pci230: remove ai_chans member



All boards supported by the "amplc_pci230" driver have 16 AI channels,
so the `ai_chans` member of `struct pci230_board` is superfluous and can
be removed.

Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0a89e714
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -454,7 +454,6 @@ enum {
struct pci230_board {
struct pci230_board {
	const char *name;
	const char *name;
	unsigned short id;
	unsigned short id;
	int ai_chans;
	int ai_bits;
	int ai_bits;
	int ao_chans;
	int ao_chans;
	int ao_bits;
	int ao_bits;
@@ -466,7 +465,6 @@ static const struct pci230_board pci230_boards[] = {
	{
	{
		.name		= "pci230+",
		.name		= "pci230+",
		.id		= PCI_DEVICE_ID_PCI230,
		.id		= PCI_DEVICE_ID_PCI230,
		.ai_chans	= 16,
		.ai_bits	= 16,
		.ai_bits	= 16,
		.ao_chans	= 2,
		.ao_chans	= 2,
		.ao_bits	= 12,
		.ao_bits	= 12,
@@ -476,14 +474,12 @@ static const struct pci230_board pci230_boards[] = {
	{
	{
		.name		= "pci260+",
		.name		= "pci260+",
		.id		= PCI_DEVICE_ID_PCI260,
		.id		= PCI_DEVICE_ID_PCI260,
		.ai_chans	= 16,
		.ai_bits	= 16,
		.ai_bits	= 16,
		.min_hwver	= 1,
		.min_hwver	= 1,
	},
	},
	{
	{
		.name		= "pci230",
		.name		= "pci230",
		.id		= PCI_DEVICE_ID_PCI230,
		.id		= PCI_DEVICE_ID_PCI230,
		.ai_chans	= 16,
		.ai_bits	= 12,
		.ai_bits	= 12,
		.ao_chans	= 2,
		.ao_chans	= 2,
		.ao_bits	= 12,
		.ao_bits	= 12,
@@ -492,7 +488,6 @@ static const struct pci230_board pci230_boards[] = {
	{
	{
		.name		= "pci260",
		.name		= "pci260",
		.id		= PCI_DEVICE_ID_PCI260,
		.id		= PCI_DEVICE_ID_PCI260,
		.ai_chans	= 16,
		.ai_bits	= 12,
		.ai_bits	= 12,
	},
	},
};
};
@@ -2660,7 +2655,7 @@ static int pci230_auto_attach(struct comedi_device *dev,
	/* analog input subdevice */
	/* analog input subdevice */
	s->type = COMEDI_SUBD_AI;
	s->type = COMEDI_SUBD_AI;
	s->subdev_flags = SDF_READABLE | SDF_DIFF | SDF_GROUND;
	s->subdev_flags = SDF_READABLE | SDF_DIFF | SDF_GROUND;
	s->n_chan = thisboard->ai_chans;
	s->n_chan = 16;
	s->maxdata = (1 << thisboard->ai_bits) - 1;
	s->maxdata = (1 << thisboard->ai_bits) - 1;
	s->range_table = &pci230_ai_range;
	s->range_table = &pci230_ai_range;
	s->insn_read = pci230_ai_rinsn;
	s->insn_read = pci230_ai_rinsn;