From: H Hartley Sweeten Date: Fri, 18 Jan 2013 17:41:07 +0000 (-0700) Subject: staging: comedi: addi_apci_16xx: board does not have analog inputs X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=564aa830e61df7c10d36cab31dd975a4fe003c97;p=linux-beck.git staging: comedi: addi_apci_16xx: board does not have analog inputs The boards supported by this driver do not have analog inputs. Remove the subdevice init for them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi_apci_16xx.c b/drivers/staging/comedi/drivers/addi_apci_16xx.c index 658943bc85f7..6417b35eb467 100644 --- a/drivers/staging/comedi/drivers/addi_apci_16xx.c +++ b/drivers/staging/comedi/drivers/addi_apci_16xx.c @@ -183,39 +183,7 @@ static int apci16xx_auto_attach(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];