[PATCH 25/34] staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrDoChannel'

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

 



All boardinfo entries have this member set as '4'. Remove the member and
initialize the Digial Output '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@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 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 9f5d7a5..fd6f64a 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3120.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3120.c
@@ -23,7 +23,6 @@ struct apci3120_board {
 	int i_AiMaxdata;
 	int i_AoMaxdata;
 	int i_NbrDiChannel;
-	int i_NbrDoChannel;
 };
 
 static const struct apci3120_board apci3120_boardtypes[] = {
@@ -36,7 +35,6 @@ static const struct apci3120_board apci3120_boardtypes[] = {
 		.i_AiMaxdata		= 0xffff,
 		.i_AoMaxdata		= 0x3fff,
 		.i_NbrDiChannel		= 4,
-		.i_NbrDoChannel		= 4,
 	},
 	[BOARD_APCI3001] = {
 		.name			= "apci3001",
@@ -45,7 +43,6 @@ static const struct apci3120_board apci3120_boardtypes[] = {
 		.i_AiChannelList	= 16,
 		.i_AiMaxdata		= 0xfff,
 		.i_NbrDiChannel		= 4,
-		.i_NbrDoChannel		= 4,
 	},
 };
 
@@ -162,9 +159,8 @@ static int apci3120_auto_attach(struct comedi_device *dev,
 	s->type = COMEDI_SUBD_DO;
 	s->subdev_flags =
 		SDF_READABLE | SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
-	s->n_chan = this_board->i_NbrDoChannel;
+	s->n_chan = 4;
 	s->maxdata = 1;
-	s->len_chanlist = this_board->i_NbrDoChannel;
 	s->range_table = &range_digital;
 	s->insn_bits = apci3120_do_insn_bits;
 
-- 
2.0.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