]> Pileus Git - ~andy/linux/commitdiff
staging: comedi: addi_apci_1032: board does not have analog inputs
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 5 Nov 2012 21:35:52 +0000 (14:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Nov 2012 08:30:55 +0000 (09:30 +0100)
This board does not have analog inputs. Remove the subdevice init for
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi_apci_1032.c

index 5ba28613b2c02a9b8c552664d1e14050186edc1c..c3f5292a7d2b3d867ea344605dea5b0cd42923f2 100644 (file)
@@ -157,39 +157,7 @@ static int apci1032_attach_pci(struct comedi_device *dev,
 
        /*  Allocate and Initialise AI Subdevice Structures */
        s = &dev->subdevices[0];
-       if ((devpriv->s_EeParameters.i_NbrAiChannel)
-               || (this_board->i_NbrAiChannelDiff)) {
-               dev->read_subdev = s;
-               s->type = COMEDI_SUBD_AI;
-               s->subdev_flags =
-                       SDF_READABLE | SDF_COMMON | SDF_GROUND
-                       | SDF_DIFF;
-               if (devpriv->s_EeParameters.i_NbrAiChannel) {
-                       s->n_chan =
-                               devpriv->s_EeParameters.i_NbrAiChannel;
-                       devpriv->b_SingelDiff = 0;
-               } else {
-                       s->n_chan = this_board->i_NbrAiChannelDiff;
-                       devpriv->b_SingelDiff = 1;
-               }
-               s->maxdata = devpriv->s_EeParameters.i_AiMaxdata;
-               s->len_chanlist = this_board->i_AiChannelList;
-               s->range_table = this_board->pr_AiRangelist;
-
-               /* Set the initialisation flag */
-               devpriv->b_AiInitialisation = 1;
-
-               s->insn_config = this_board->ai_config;
-               s->insn_read = this_board->ai_read;
-               s->insn_write = this_board->ai_write;
-               s->insn_bits = this_board->ai_bits;
-               s->do_cmdtest = this_board->ai_cmdtest;
-               s->do_cmd = this_board->ai_cmd;
-               s->cancel = this_board->ai_cancel;
-
-       } else {
-               s->type = COMEDI_SUBD_UNUSED;
-       }
+       s->type = COMEDI_SUBD_UNUSED;
 
        /*  Allocate and Initialise AO Subdevice Structures */
        s = &dev->subdevices[1];