[PATCH 26/34] staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrDiChannel'

H Hartley Sweeten hsweeten at visionengravers.com
Tue Oct 14 17:44:42 UTC 2014


All boardinfo entries have this member set as '4'. Remove the member and
initialize the Digial Input 'n_chan' with 4 directly.

Also, remove the initialization of 'len_chanlist'. This member is only
used with subdevices that support async commands.

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/addi_apci_3120.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c
index fd6f64a..18e0b13 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3120.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3120.c
@@ -22,7 +22,6 @@ struct apci3120_board {
 	int i_NbrAoChannel;
 	int i_AiMaxdata;
 	int i_AoMaxdata;
-	int i_NbrDiChannel;
 };
 
 static const struct apci3120_board apci3120_boardtypes[] = {
@@ -34,7 +33,6 @@ static const struct apci3120_board apci3120_boardtypes[] = {
 		.i_NbrAoChannel		= 8,
 		.i_AiMaxdata		= 0xffff,
 		.i_AoMaxdata		= 0x3fff,
-		.i_NbrDiChannel		= 4,
 	},
 	[BOARD_APCI3001] = {
 		.name			= "apci3001",
@@ -42,7 +40,6 @@ static const struct apci3120_board apci3120_boardtypes[] = {
 		.i_NbrAiChannelDiff	= 8,
 		.i_AiChannelList	= 16,
 		.i_AiMaxdata		= 0xfff,
-		.i_NbrDiChannel		= 4,
 	},
 };
 
@@ -148,9 +145,8 @@ static int apci3120_auto_attach(struct comedi_device *dev,
 	s = &dev->subdevices[2];
 	s->type = COMEDI_SUBD_DI;
 	s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON;
-	s->n_chan = this_board->i_NbrDiChannel;
+	s->n_chan = 4;
 	s->maxdata = 1;
-	s->len_chanlist = this_board->i_NbrDiChannel;
 	s->range_table = &range_digital;
 	s->insn_bits = apci3120_di_insn_bits;
 
-- 
2.0.3



More information about the devel mailing list