[PATCH 20/28] staging: comedi: ni_mio_common: refactor 'num_p0_dio_channels' boardinfo

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

 



All of the board supported by this driver have at least 8 Digital I/O
channels. A couple of the PCI boards in ni_pcimio have 32 channels.

For aesthetics, change this member of the boardinfo into a bit-field
flag, 'has_32dio_chan', and use that when initializing the DIO subdevice
to set the number of channels to 32 or 8.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregk@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/ni_atmio.c      |  8 ---
 drivers/staging/comedi/drivers/ni_mio_common.c |  2 +-
 drivers/staging/comedi/drivers/ni_mio_cs.c     |  6 ---
 drivers/staging/comedi/drivers/ni_pcimio.c     | 67 ++++----------------------
 drivers/staging/comedi/drivers/ni_stc.h        |  3 +-
 5 files changed, 12 insertions(+), 74 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
index 3858061..c613423 100644
--- a/drivers/staging/comedi/drivers/ni_atmio.c
+++ b/drivers/staging/comedi/drivers/ni_atmio.c
@@ -117,7 +117,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { mb88341 },
 	}, {
 		.name		= "at-mio-16e-2",
@@ -133,7 +132,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { mb88341 },
 	}, {
 		.name		= "at-mio-16e-10",
@@ -148,7 +146,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0x0fff,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 10000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	}, {
 		.name		= "at-mio-16de-10",
@@ -163,7 +160,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0x0fff,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 10000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 		.has_8255	= 1,
 	}, {
@@ -180,7 +176,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	}, {
 		.name		= "at-mio-16xe-50",
@@ -196,7 +191,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0x0fff,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 50000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043 },
 	}, {
 		.name		= "at-mio-16xe-10",
@@ -213,7 +207,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043, ad8522 },
 	}, {
 		.name		= "at-ai-16xe-10",
@@ -225,7 +218,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.alwaysdither	= 1,	/* unknown */
 		.gainlkup	= ai_gain_14,
 		.ai_speed	= 10000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043, ad8522 },
 	},
 };
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index 91b3fb4..7146f21 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -5582,7 +5582,7 @@ static int ni_E_init(struct comedi_device *dev,
 	s->maxdata = 1;
 	s->io_bits = 0;		/* all bits input */
 	s->range_table = &range_digital;
-	s->n_chan = board->num_p0_dio_channels;
+	s->n_chan = board->has_32dio_chan ? 32 : 8;
 	if (devpriv->is_m_series) {
 		s->subdev_flags |=
 		    SDF_LSAMPL | SDF_CMD_WRITE /* | SDF_CMD_READ */;
diff --git a/drivers/staging/comedi/drivers/ni_mio_cs.c b/drivers/staging/comedi/drivers/ni_mio_cs.c
index bb414ec..9b201e4 100644
--- a/drivers/staging/comedi/drivers/ni_mio_cs.c
+++ b/drivers/staging/comedi/drivers/ni_mio_cs.c
@@ -60,7 +60,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ai_fifo_depth	= 1024,
 		.gainlkup	= ai_gain_8,
 		.ai_speed	= 5000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043 },
 	}, {
 		.name		= "DAQCard-ai-16e-4",
@@ -70,7 +69,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ai_fifo_depth	= 1024,
 		.gainlkup	= ai_gain_16,
 		.ai_speed	= 4000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { mb88341 },		/* verified */
 	}, {
 		.name		= "DAQCard-6062E",
@@ -85,7 +83,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 1176,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },	/* verified */
 	 }, {
 		/* specs incorrect! */
@@ -100,7 +97,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0x0fff,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 1000000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	}, {
 		/* specs incorrect! */
@@ -116,7 +112,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0xffff,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 1000000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	 },
 #if 0
@@ -126,7 +121,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.n_aochan	= 8,
 		.ao_maxdata	= 0x0fff,
 		.ao_671x	= 8192,
-		.num_p0_dio_channels = 8,
 		.caldac		= { mb88341, mb88341 },
 	},
 #endif
diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c
index 8261cf7..1532fac 100644
--- a/drivers/staging/comedi/drivers/ni_pcimio.c
+++ b/drivers/staging/comedi/drivers/ni_pcimio.c
@@ -220,7 +220,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0x0fff,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 50000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043 },
 	},
 	[BOARD_PCIMIO_16XE_10] = {
@@ -236,7 +235,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 10000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043, ad8522 },
 	},
 	[BOARD_PCI6014] = {
@@ -251,7 +249,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0xffff,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 100000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	},
 	[BOARD_PXI6030E] = {
@@ -267,7 +264,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 10000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043, ad8522 },
 	},
 	[BOARD_PCIMIO_16E_1] = {
@@ -282,7 +278,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { mb88341 },
 	},
 	[BOARD_PCIMIO_16E_4] = {
@@ -301,7 +296,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 512,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },	/* doc says mb88341 */
 	},
 	[BOARD_PXI6040E] = {
@@ -316,7 +310,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 512,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { mb88341 },
 	},
 	[BOARD_PCI6031E] = {
@@ -332,7 +325,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 10000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043, ad8522 },
 	},
 	[BOARD_PCI6032E] = {
@@ -343,7 +335,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.alwaysdither	= 1,
 		.gainlkup	= ai_gain_14,
 		.ai_speed	= 10000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043, ad8522 },
 	},
 	[BOARD_PCI6033E] = {
@@ -354,7 +345,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.alwaysdither	= 1,
 		.gainlkup	= ai_gain_14,
 		.ai_speed	= 10000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043, ad8522 },
 	},
 	[BOARD_PCI6071E] = {
@@ -370,7 +360,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	},
 	[BOARD_PCI6023E] = {
@@ -380,7 +369,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ai_fifo_depth	= 512,
 		.gainlkup	= ai_gain_4,
 		.ai_speed	= 5000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },	/* manual is wrong */
 	},
 	[BOARD_PCI6024E] = {
@@ -394,7 +382,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0x0fff,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 100000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },	/* manual is wrong */
 	},
 	[BOARD_PCI6025E] = {
@@ -408,7 +395,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0x0fff,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 100000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },	/* manual is wrong */
 		.has_8255	= 1,
 	},
@@ -423,7 +409,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0x0fff,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 100000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },	/* manual is wrong */
 		.has_8255	= 1,
 	},
@@ -435,7 +420,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.alwaysdither	= 1,
 		.gainlkup	= ai_gain_4,
 		.ai_speed	= 5000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	},
 	[BOARD_PCI6035E] = {
@@ -450,7 +434,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0x0fff,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 100000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	},
 	[BOARD_PCI6052E] = {
@@ -466,7 +449,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 3000,
-		.num_p0_dio_channels = 8,
 		/* manual is wrong */
 		.caldac		= { ad8804_debug, ad8804_debug, ad8522 },
 	},
@@ -484,7 +466,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_bipolar10,
 		.ao_fifo_depth	= 2048,
 		.ao_speed	= 250,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804, ad8804 },
 	},
 	[BOARD_PCI6111] = {
@@ -500,7 +481,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_bipolar10,
 		.ao_fifo_depth	= 2048,
 		.ao_speed	= 250,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804, ad8804 },
 	},
 #if 0
@@ -517,7 +497,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_671x	= 1,
 		.ao_fifo_depth	= 2048,
 		.ao_speed	= 250,
-		.num_p0_dio_channels = 8,
 		.reg_611x	= 1,
 		/* XXX */
 		.caldac		= { ad8804_debug, ad8804_debug, ad8804_debug },
@@ -537,7 +516,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_speed	= 250,
 		.reg_611x	= 1,
-		.num_p0_dio_channels = 8,
 		/* XXX */
 		.caldac		= { ad8804_debug, ad8804_debug, ad8804_debug },
 	},
@@ -550,7 +528,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 16384,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.reg_type	= ni_reg_6711,
 		.caldac		= { ad8804_debug },
 	},
@@ -561,7 +538,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 16384,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.reg_type	= ni_reg_6711,
 		.caldac		= { ad8804_debug },
 	},
@@ -572,7 +548,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 16384,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.reg_type	= ni_reg_6713,
 		.caldac		= { ad8804_debug, ad8804_debug },
 	},
@@ -583,7 +558,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 16384,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.reg_type	= ni_reg_6713,
 		.caldac		= { ad8804_debug, ad8804_debug },
 	},
@@ -594,7 +568,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 8192,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.reg_type	= ni_reg_6711,
 		.caldac		= { ad8804_debug },
 	},
@@ -605,7 +578,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0xffff,
 		.ao_fifo_depth	= 8192,
 		.ao_range_table	= &range_bipolar10,
-		.num_p0_dio_channels = 8,
 		.reg_type	= ni_reg_6711,
 		.caldac		= { ad8804_debug },
 	},
@@ -617,7 +589,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 16384,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.reg_type	= ni_reg_6713,
 		.caldac		= { ad8804_debug, ad8804_debug },
 	},
@@ -628,7 +599,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 16384,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.reg_type	= ni_reg_6713,
 		.caldac		= { ad8804_debug, ad8804_debug },
 	},
@@ -645,7 +615,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	},
 	[BOARD_PXI6070E] = {
@@ -661,7 +630,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 1000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	},
 	[BOARD_PXI6052E] = {
@@ -677,7 +645,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 3000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { mb88341, mb88341, ad8522 },
 	},
 	[BOARD_PXI6031E] = {
@@ -693,7 +660,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_fifo_depth	= 2048,
 		.ao_range_table	= &range_ni_E_ao_ext,
 		.ao_speed	= 10000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { dac8800, dac8043, ad8522 },
 	},
 	[BOARD_PCI6036E] = {
@@ -708,7 +674,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_maxdata	= 0xffff,
 		.ao_range_table	= &range_bipolar10,
 		.ao_speed	= 100000,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug },
 	},
 	[BOARD_PCI6220] = {
@@ -718,7 +683,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ai_fifo_depth	= 512,		/* FIXME: guess */
 		.gainlkup	= ai_gain_622x,
 		.ai_speed	= 4000,
-		.num_p0_dio_channels = 8,
 		.reg_type	= ni_reg_622x,
 		.caldac		= { caldac_none },
 	},
@@ -735,7 +699,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_bipolar10,
 		.reg_type	= ni_reg_622x,
 		.ao_speed	= 1200,
-		.num_p0_dio_channels = 8,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6221_37PIN] = {
@@ -751,7 +714,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_bipolar10,
 		.reg_type	= ni_reg_622x,
 		.ao_speed	= 1200,
-		.num_p0_dio_channels = 8,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6224] = {
@@ -762,7 +724,7 @@ static const struct ni_board_struct ni_boards[] = {
 		.gainlkup	= ai_gain_622x,
 		.ai_speed	= 4000,
 		.reg_type	= ni_reg_622x,
-		.num_p0_dio_channels = 32,
+		.has_32dio_chan	= 1,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PXI6224] = {
@@ -773,7 +735,7 @@ static const struct ni_board_struct ni_boards[] = {
 		.gainlkup	= ai_gain_622x,
 		.ai_speed	= 4000,
 		.reg_type	= ni_reg_622x,
-		.num_p0_dio_channels = 32,
+		.has_32dio_chan	= 1,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6225] = {
@@ -789,7 +751,7 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_bipolar10,
 		.reg_type	= ni_reg_622x,
 		.ao_speed	= 1200,
-		.num_p0_dio_channels = 32,
+		.has_32dio_chan	= 1,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PXI6225] = {
@@ -805,7 +767,7 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_bipolar10,
 		.reg_type	= ni_reg_622x,
 		.ao_speed	= 1200,
-		.num_p0_dio_channels = 32,
+		.has_32dio_chan	= 1,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6229] = {
@@ -821,7 +783,7 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_bipolar10,
 		.reg_type	= ni_reg_622x,
 		.ao_speed	= 1200,
-		.num_p0_dio_channels = 32,
+		.has_32dio_chan	= 1,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6250] = {
@@ -832,7 +794,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.gainlkup	= ai_gain_628x,
 		.ai_speed	= 800,
 		.reg_type	= ni_reg_625x,
-		.num_p0_dio_channels = 8,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6251] = {
@@ -848,7 +809,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_ni_M_625x_ao,
 		.reg_type	= ni_reg_625x,
 		.ao_speed	= 350,
-		.num_p0_dio_channels = 8,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCIE6251] = {
@@ -864,7 +824,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_ni_M_625x_ao,
 		.reg_type	= ni_reg_625x,
 		.ao_speed	= 350,
-		.num_p0_dio_channels = 8,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PXIE6251] = {
@@ -880,7 +839,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_ni_M_625x_ao,
 		.reg_type	= ni_reg_625x,
 		.ao_speed	= 350,
-		.num_p0_dio_channels = 8,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6254] = {
@@ -891,7 +849,7 @@ static const struct ni_board_struct ni_boards[] = {
 		.gainlkup	= ai_gain_628x,
 		.ai_speed	= 800,
 		.reg_type	= ni_reg_625x,
-		.num_p0_dio_channels = 32,
+		.has_32dio_chan	= 1,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6259] = {
@@ -907,7 +865,7 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_ni_M_625x_ao,
 		.reg_type	= ni_reg_625x,
 		.ao_speed	= 350,
-		.num_p0_dio_channels = 32,
+		.has_32dio_chan	= 1,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCIE6259] = {
@@ -923,7 +881,7 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_ni_M_625x_ao,
 		.reg_type	= ni_reg_625x,
 		.ao_speed	= 350,
-		.num_p0_dio_channels = 32,
+		.has_32dio_chan	= 1,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6280] = {
@@ -935,7 +893,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ai_speed	= 1600,
 		.ao_fifo_depth	= 8191,
 		.reg_type	= ni_reg_628x,
-		.num_p0_dio_channels = 8,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6281] = {
@@ -951,7 +908,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table = &range_ni_M_628x_ao,
 		.reg_type	= ni_reg_628x,
 		.ao_speed	= 350,
-		.num_p0_dio_channels = 8,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PXI6281] = {
@@ -967,7 +923,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_ni_M_628x_ao,
 		.reg_type	= ni_reg_628x,
 		.ao_speed	= 350,
-		.num_p0_dio_channels = 8,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6284] = {
@@ -978,7 +933,7 @@ static const struct ni_board_struct ni_boards[] = {
 		.gainlkup	= ai_gain_628x,
 		.ai_speed	= 1600,
 		.reg_type	= ni_reg_628x,
-		.num_p0_dio_channels = 32,
+		.has_32dio_chan	= 1,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6289] = {
@@ -994,7 +949,7 @@ static const struct ni_board_struct ni_boards[] = {
 		.ao_range_table	= &range_ni_M_628x_ao,
 		.reg_type	= ni_reg_628x,
 		.ao_speed	= 350,
-		.num_p0_dio_channels = 32,
+		.has_32dio_chan	= 1,
 		.caldac		= { caldac_none },
 	},
 	[BOARD_PCI6143] = {
@@ -1005,7 +960,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.gainlkup	= ai_gain_6143,
 		.ai_speed	= 4000,
 		.reg_type	= ni_reg_6143,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug, ad8804_debug },
 	},
 	[BOARD_PXI6143] = {
@@ -1016,7 +970,6 @@ static const struct ni_board_struct ni_boards[] = {
 		.gainlkup	= ai_gain_6143,
 		.ai_speed	= 4000,
 		.reg_type	= ni_reg_6143,
-		.num_p0_dio_channels = 8,
 		.caldac		= { ad8804_debug, ad8804_debug },
 	},
 };
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index b3faed5..caad9d8 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -1406,10 +1406,9 @@ struct ni_board_struct {
 	const struct comedi_lrange *ao_range_table;
 	unsigned ao_speed;
 
-	unsigned num_p0_dio_channels;
-
 	int reg_type;
 	unsigned int has_8255:1;
+	unsigned int has_32dio_chan:1;
 
 	enum caldac_enum caldac[3];
 };
-- 
1.9.3

_______________________________________________
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