From: H Hartley Sweeten Date: Wed, 12 Jun 2013 23:18:31 +0000 (-0700) Subject: staging: comedi: addi_apci_3xxx: remove 'i_AiChannelList' from the boardinfo X-Git-Tag: MMI-PSA29.97-13-9~14152^2~121 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=79518d9f9c2025449e66a9f00f18d6962f859627;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging: comedi: addi_apci_3xxx: remove 'i_AiChannelList' from the boardinfo The analog input s->len_chanlist for the boards supported by this driver should always be the number of channels (s->n_chan). Use that instead and remove the 'i_AiChannelList' from the boardinfo. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c index 0c5c05caaab8..1f6da1479042 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c +++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c @@ -79,7 +79,6 @@ struct apci3xxx_boardinfo { const char *pc_DriverName; int i_NbrAiChannel; int i_NbrAiChannelDiff; - int i_AiChannelList; int i_AiMaxdata; unsigned char b_AvailableConvertUnit; unsigned int ui_MinAcquisitiontimeNs; @@ -94,7 +93,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3000-16", .i_NbrAiChannel = 16, .i_NbrAiChannelDiff = 8, - .i_AiChannelList = 16, .i_AiMaxdata = 4095, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 10000, @@ -104,7 +102,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3000-8", .i_NbrAiChannel = 8, .i_NbrAiChannelDiff = 4, - .i_AiChannelList = 8, .i_AiMaxdata = 4095, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 10000, @@ -114,7 +111,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3000-4", .i_NbrAiChannel = 4, .i_NbrAiChannelDiff = 2, - .i_AiChannelList = 4, .i_AiMaxdata = 4095, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 10000, @@ -124,7 +120,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3006-16", .i_NbrAiChannel = 16, .i_NbrAiChannelDiff = 8, - .i_AiChannelList = 16, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 10000, @@ -134,7 +129,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3006-8", .i_NbrAiChannel = 8, .i_NbrAiChannelDiff = 4, - .i_AiChannelList = 8, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 10000, @@ -144,7 +138,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3006-4", .i_NbrAiChannel = 4, .i_NbrAiChannelDiff = 2, - .i_AiChannelList = 4, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 10000, @@ -154,7 +147,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3010-16", .i_NbrAiChannel = 16, .i_NbrAiChannelDiff = 8, - .i_AiChannelList = 16, .i_AiMaxdata = 4095, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -166,7 +158,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3010-8", .i_NbrAiChannel = 8, .i_NbrAiChannelDiff = 4, - .i_AiChannelList = 8, .i_AiMaxdata = 4095, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -178,7 +169,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3010-4", .i_NbrAiChannel = 4, .i_NbrAiChannelDiff = 2, - .i_AiChannelList = 4, .i_AiMaxdata = 4095, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -190,7 +180,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3016-16", .i_NbrAiChannel = 16, .i_NbrAiChannelDiff = 8, - .i_AiChannelList = 16, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -202,7 +191,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3016-8", .i_NbrAiChannel = 8, .i_NbrAiChannelDiff = 4, - .i_AiChannelList = 8, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -214,7 +202,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3016-4", .i_NbrAiChannel = 4, .i_NbrAiChannelDiff = 2, - .i_AiChannelList = 4, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -226,7 +213,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3100-16-4", .i_NbrAiChannel = 16, .i_NbrAiChannelDiff = 8, - .i_AiChannelList = 16, .i_AiMaxdata = 4095, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 10000, @@ -237,7 +223,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3100-8-4", .i_NbrAiChannel = 8, .i_NbrAiChannelDiff = 4, - .i_AiChannelList = 8, .i_AiMaxdata = 4095, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 10000, @@ -248,7 +233,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3106-16-4", .i_NbrAiChannel = 16, .i_NbrAiChannelDiff = 8, - .i_AiChannelList = 16, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 10000, @@ -259,7 +243,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3106-8-4", .i_NbrAiChannel = 8, .i_NbrAiChannelDiff = 4, - .i_AiChannelList = 8, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 10000, @@ -270,7 +253,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3110-16-4", .i_NbrAiChannel = 16, .i_NbrAiChannelDiff = 8, - .i_AiChannelList = 16, .i_AiMaxdata = 4095, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -283,7 +265,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3110-8-4", .i_NbrAiChannel = 8, .i_NbrAiChannelDiff = 4, - .i_AiChannelList = 8, .i_AiMaxdata = 4095, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -296,7 +277,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3116-16-4", .i_NbrAiChannel = 16, .i_NbrAiChannelDiff = 8, - .i_AiChannelList = 16, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -309,7 +289,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { .pc_DriverName = "apci3116-8-4", .i_NbrAiChannel = 8, .i_NbrAiChannelDiff = 4, - .i_AiChannelList = 8, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -321,7 +300,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { [BOARD_APCI3003] = { .pc_DriverName = "apci3003", .i_NbrAiChannelDiff = 4, - .i_AiChannelList = 4, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 7, .ui_MinAcquisitiontimeNs = 2500, @@ -331,7 +309,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { [BOARD_APCI3002_16] = { .pc_DriverName = "apci3002-16", .i_NbrAiChannelDiff = 16, - .i_AiChannelList = 16, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -341,7 +318,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { [BOARD_APCI3002_8] = { .pc_DriverName = "apci3002-8", .i_NbrAiChannelDiff = 8, - .i_AiChannelList = 8, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -351,7 +327,6 @@ static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = { [BOARD_APCI3002_4] = { .pc_DriverName = "apci3002-4", .i_NbrAiChannelDiff = 4, - .i_AiChannelList = 4, .i_AiMaxdata = 65535, .b_AvailableConvertUnit = 6, .ui_MinAcquisitiontimeNs = 5000, @@ -629,7 +604,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev, devpriv->b_SingelDiff = 1; } s->maxdata = board->i_AiMaxdata; - s->len_chanlist = board->i_AiChannelList; + s->len_chanlist = s->n_chan; s->range_table = &apci3xxx_ai_range; s->insn_config = i_APCI3XXX_InsnConfigAnalogInput;