aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-11-29 20:17:47 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-29 21:05:30 -0500
commit490555966e77f7e3e8ccbe70629a149451b56a3c (patch)
treed173334946f4ed5e297ef1606a4a296ba1888f5e
parentff5eb17ef48738dcc3348d765134a915c9d5091d (diff)
staging: comedi: addi_apci_2032: 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 <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_2032.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c
index 57c592532cbd..9b0c402bed0f 100644
--- a/drivers/staging/comedi/drivers/addi_apci_2032.c
+++ b/drivers/staging/comedi/drivers/addi_apci_2032.c
@@ -88,23 +88,6 @@ static int apci2032_auto_attach(struct comedi_device *dev,
88 return ret; 88 return ret;
89 dev->iobase = pci_resource_start(pcidev, 1); 89 dev->iobase = pci_resource_start(pcidev, 1);
90 90
91 /* Initialize parameters that can be overridden in EEPROM */
92 devpriv->s_EeParameters.i_NbrAiChannel = this_board->i_NbrAiChannel;
93 devpriv->s_EeParameters.i_NbrAoChannel = this_board->i_NbrAoChannel;
94 devpriv->s_EeParameters.i_AiMaxdata = this_board->i_AiMaxdata;
95 devpriv->s_EeParameters.i_AoMaxdata = this_board->i_AoMaxdata;
96 devpriv->s_EeParameters.i_NbrDiChannel = this_board->i_NbrDiChannel;
97 devpriv->s_EeParameters.i_NbrDoChannel = this_board->i_NbrDoChannel;
98 devpriv->s_EeParameters.i_DoMaxdata = this_board->i_DoMaxdata;
99 devpriv->s_EeParameters.i_Dma = this_board->i_Dma;
100 devpriv->s_EeParameters.i_Timer = this_board->i_Timer;
101 devpriv->s_EeParameters.ui_MinAcquisitiontimeNs =
102 this_board->ui_MinAcquisitiontimeNs;
103 devpriv->s_EeParameters.ui_MinDelaytimeNs =
104 this_board->ui_MinDelaytimeNs;
105
106 /* ## */
107
108 if (pcidev->irq > 0) { 91 if (pcidev->irq > 0) {
109 ret = request_irq(pcidev->irq, v_ADDI_Interrupt, IRQF_SHARED, 92 ret = request_irq(pcidev->irq, v_ADDI_Interrupt, IRQF_SHARED,
110 dev->board_name, dev); 93 dev->board_name, dev);
@@ -131,14 +114,13 @@ static int apci2032_auto_attach(struct comedi_device *dev,
131 114
132 /* Allocate and Initialise DO Subdevice Structures */ 115 /* Allocate and Initialise DO Subdevice Structures */
133 s = &dev->subdevices[3]; 116 s = &dev->subdevices[3];
134 if (devpriv->s_EeParameters.i_NbrDoChannel) { 117 if (this_board->i_NbrDoChannel) {
135 s->type = COMEDI_SUBD_DO; 118 s->type = COMEDI_SUBD_DO;
136 s->subdev_flags = 119 s->subdev_flags =
137 SDF_READABLE | SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; 120 SDF_READABLE | SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
138 s->n_chan = devpriv->s_EeParameters.i_NbrDoChannel; 121 s->n_chan = this_board->i_NbrDoChannel;
139 s->maxdata = devpriv->s_EeParameters.i_DoMaxdata; 122 s->maxdata = this_board->i_DoMaxdata;
140 s->len_chanlist = 123 s->len_chanlist = this_board->i_NbrDoChannel;
141 devpriv->s_EeParameters.i_NbrDoChannel;
142 s->range_table = &range_digital; 124 s->range_table = &range_digital;
143 s->io_bits = 0xf; /* all bits output */ 125 s->io_bits = 0xf; /* all bits output */
144 126
@@ -153,7 +135,7 @@ static int apci2032_auto_attach(struct comedi_device *dev,
153 135
154 /* Allocate and Initialise Timer Subdevice Structures */ 136 /* Allocate and Initialise Timer Subdevice Structures */
155 s = &dev->subdevices[4]; 137 s = &dev->subdevices[4];
156 if (devpriv->s_EeParameters.i_Timer) { 138 if (this_board->i_Timer) {
157 s->type = COMEDI_SUBD_TIMER; 139 s->type = COMEDI_SUBD_TIMER;
158 s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; 140 s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
159 s->n_chan = 1; 141 s->n_chan = 1;