From: H Hartley Sweeten Date: Tue, 13 Nov 2012 20:43:10 +0000 (-0700) Subject: staging: comedi: addi_apci_1516: remove use of devpriv->s_EeParameters X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=321ab8a09fc08aac07286707071bdbd614d37bfc;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: addi_apci_1516: remove use of devpriv->s_EeParameters This driver no longer reads the eeprom to find the board specific data, all the necessary data is in the boardinfo. Use the boardinfo directly instead of passing through devpriv->s_EeParameters. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi_apci_1516.c b/drivers/staging/comedi/drivers/addi_apci_1516.c index f4ccfc6f19f9..1bb059fe0258 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1516.c +++ b/drivers/staging/comedi/drivers/addi_apci_1516.c @@ -87,21 +87,6 @@ static int __devinit apci1516_auto_attach(struct comedi_device *dev, dev->iobase = pci_resource_start(pcidev, 1); devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2); - /* Initialize parameters that can be overridden in EEPROM */ - devpriv->s_EeParameters.i_NbrAiChannel = this_board->i_NbrAiChannel; - devpriv->s_EeParameters.i_NbrAoChannel = this_board->i_NbrAoChannel; - devpriv->s_EeParameters.i_AiMaxdata = this_board->i_AiMaxdata; - devpriv->s_EeParameters.i_AoMaxdata = this_board->i_AoMaxdata; - devpriv->s_EeParameters.i_NbrDiChannel = this_board->i_NbrDiChannel; - devpriv->s_EeParameters.i_NbrDoChannel = this_board->i_NbrDoChannel; - devpriv->s_EeParameters.i_DoMaxdata = this_board->i_DoMaxdata; - devpriv->s_EeParameters.i_Dma = this_board->i_Dma; - devpriv->s_EeParameters.i_Timer = this_board->i_Timer; - devpriv->s_EeParameters.ui_MinAcquisitiontimeNs = - this_board->ui_MinAcquisitiontimeNs; - devpriv->s_EeParameters.ui_MinDelaytimeNs = - this_board->ui_MinDelaytimeNs; - n_subdevices = 7; ret = comedi_alloc_subdevices(dev, n_subdevices); if (ret) @@ -117,13 +102,12 @@ static int __devinit apci1516_auto_attach(struct comedi_device *dev, /* Allocate and Initialise DI Subdevice Structures */ s = &dev->subdevices[2]; - if (devpriv->s_EeParameters.i_NbrDiChannel) { + if (this_board->i_NbrDiChannel) { s->type = COMEDI_SUBD_DI; s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON; - s->n_chan = devpriv->s_EeParameters.i_NbrDiChannel; + s->n_chan = this_board->i_NbrDiChannel; s->maxdata = 1; - s->len_chanlist = - devpriv->s_EeParameters.i_NbrDiChannel; + s->len_chanlist = this_board->i_NbrDiChannel; s->range_table = &range_digital; s->io_bits = 0; /* all bits input */ s->insn_bits = apci1516_di_insn_bits; @@ -132,14 +116,13 @@ static int __devinit apci1516_auto_attach(struct comedi_device *dev, } /* Allocate and Initialise DO Subdevice Structures */ s = &dev->subdevices[3]; - if (devpriv->s_EeParameters.i_NbrDoChannel) { + if (this_board->i_NbrDoChannel) { s->type = COMEDI_SUBD_DO; s->subdev_flags = SDF_READABLE | SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; - s->n_chan = devpriv->s_EeParameters.i_NbrDoChannel; - s->maxdata = devpriv->s_EeParameters.i_DoMaxdata; - s->len_chanlist = - devpriv->s_EeParameters.i_NbrDoChannel; + s->n_chan = this_board->i_NbrDoChannel; + s->maxdata = 1; + s->len_chanlist = this_board->i_NbrDoChannel; s->range_table = &range_digital; s->io_bits = 0xf; /* all bits output */ s->insn_bits = apci1516_do_insn_bits; @@ -149,7 +132,7 @@ static int __devinit apci1516_auto_attach(struct comedi_device *dev, /* Allocate and Initialise Timer Subdevice Structures */ s = &dev->subdevices[4]; - if (devpriv->s_EeParameters.i_Timer) { + if (this_board->i_Timer) { s->type = COMEDI_SUBD_TIMER; s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; s->n_chan = 1;