staging: comedi: addi_apci_3xxx: remove 'i_AiChannelList' from the boardinfo
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 12 Jun 2013 23:18:31 +0000 (16:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jun 2013 21:33:54 +0000 (14:33 -0700)
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 <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi_apci_3xxx.c

index 0c5c05caaab83acbb04b593a4e78c9099b993484..1f6da1479042085b83fdc6cad3783e5012322156 100644 (file)
@@ -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;