Commit 66d76f19 authored by Chase Southwood's avatar Chase Southwood Committed by Greg Kroah-Hartman

staging: comedi: addi_apci_1564: 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: default avatarChase Southwood <chase.southwood@gmail.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a7e04a08
...@@ -65,22 +65,6 @@ static int apci1564_auto_attach(struct comedi_device *dev, ...@@ -65,22 +65,6 @@ static int apci1564_auto_attach(struct comedi_device *dev,
dev->iobase = pci_resource_start(pcidev, 1); dev->iobase = pci_resource_start(pcidev, 1);
devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0); devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
/* 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_Timer = this_board->i_Timer;
devpriv->s_EeParameters.ui_MinAcquisitiontimeNs =
this_board->ui_MinAcquisitiontimeNs;
devpriv->s_EeParameters.ui_MinDelaytimeNs =
this_board->ui_MinDelaytimeNs;
/* ## */
if (pcidev->irq > 0) { if (pcidev->irq > 0) {
ret = request_irq(pcidev->irq, v_ADDI_Interrupt, IRQF_SHARED, ret = request_irq(pcidev->irq, v_ADDI_Interrupt, IRQF_SHARED,
dev->board_name, dev); dev->board_name, dev);
...@@ -114,14 +98,13 @@ static int apci1564_auto_attach(struct comedi_device *dev, ...@@ -114,14 +98,13 @@ static int apci1564_auto_attach(struct comedi_device *dev,
/* Allocate and Initialise DO Subdevice Structures */ /* Allocate and Initialise DO Subdevice Structures */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
if (devpriv->s_EeParameters.i_NbrDoChannel) { if (this_board->i_NbrDoChannel) {
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = s->subdev_flags =
SDF_READABLE | SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; SDF_READABLE | SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = devpriv->s_EeParameters.i_NbrDoChannel; s->n_chan = this_board->i_NbrDoChannel;
s->maxdata = devpriv->s_EeParameters.i_DoMaxdata; s->maxdata = this_board->i_DoMaxdata;
s->len_chanlist = s->len_chanlist = this_board->i_NbrDoChannel;
devpriv->s_EeParameters.i_NbrDoChannel;
s->range_table = &range_digital; s->range_table = &range_digital;
/* insn_config - for digital output memory */ /* insn_config - for digital output memory */
...@@ -135,7 +118,7 @@ static int apci1564_auto_attach(struct comedi_device *dev, ...@@ -135,7 +118,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
/* Allocate and Initialise Timer Subdevice Structures */ /* Allocate and Initialise Timer Subdevice Structures */
s = &dev->subdevices[4]; s = &dev->subdevices[4];
if (devpriv->s_EeParameters.i_Timer) { if (this_board->i_Timer) {
s->type = COMEDI_SUBD_TIMER; s->type = COMEDI_SUBD_TIMER;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = 1; s->n_chan = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment