aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-07-18 22:00:54 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-19 19:51:37 -0400
commitb694c4f4339bf4126e944def8318ff4f5cfbee76 (patch)
tree1d953c73ecbfc0402a9dc4bf36ce5a0cf527cc26 /drivers
parent87790601cc603ea657fa667dd329fb21f318dfa9 (diff)
staging: comedi: dyna_pci10xx: use dev->iobase
Use dev->iobase to hold one of the pci base addresses used by the driver instead of carrying it in the private data. 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/dyna_pci10xx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/drivers/staging/comedi/drivers/dyna_pci10xx.c
index 95ee4223732..e7086b1e1ad 100644
--- a/drivers/staging/comedi/drivers/dyna_pci10xx.c
+++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c
@@ -104,7 +104,7 @@ struct dyna_pci10xx_private {
104 struct mutex mutex; 104 struct mutex mutex;
105 105
106 /* device base address registers */ 106 /* device base address registers */
107 unsigned long BADR2, BADR3; 107 unsigned long BADR3;
108}; 108};
109 109
110#define thisboard ((const struct boardtype *)dev->board_ptr) 110#define thisboard ((const struct boardtype *)dev->board_ptr)
@@ -132,11 +132,11 @@ static int dyna_pci10xx_insn_read_ai(struct comedi_device *dev,
132 for (n = 0; n < insn->n; n++) { 132 for (n = 0; n < insn->n; n++) {
133 /* trigger conversion */ 133 /* trigger conversion */
134 smp_mb(); 134 smp_mb();
135 outw_p(0x0000 + range + chan, devpriv->BADR2 + 2); 135 outw_p(0x0000 + range + chan, dev->iobase + 2);
136 udelay(10); 136 udelay(10);
137 /* read data */ 137 /* read data */
138 for (counter = 0; counter < READ_TIMEOUT; counter++) { 138 for (counter = 0; counter < READ_TIMEOUT; counter++) {
139 d = inw_p(devpriv->BADR2); 139 d = inw_p(dev->iobase);
140 140
141 /* check if read is successful if the EOC bit is set */ 141 /* check if read is successful if the EOC bit is set */
142 if (d & (1 << 15)) 142 if (d & (1 << 15))
@@ -172,7 +172,7 @@ static int dyna_pci10xx_insn_write_ao(struct comedi_device *dev,
172 for (n = 0; n < insn->n; n++) { 172 for (n = 0; n < insn->n; n++) {
173 smp_mb(); 173 smp_mb();
174 /* trigger conversion and write data */ 174 /* trigger conversion and write data */
175 outw_p(data[n], devpriv->BADR2); 175 outw_p(data[n], dev->iobase);
176 udelay(10); 176 udelay(10);
177 } 177 }
178 mutex_unlock(&devpriv->mutex); 178 mutex_unlock(&devpriv->mutex);
@@ -288,7 +288,7 @@ static int dyna_pci10xx_attach(struct comedi_device *dev,
288 288
289 printk(KERN_INFO "comedi: dyna_pci10xx: device found!\n"); 289 printk(KERN_INFO "comedi: dyna_pci10xx: device found!\n");
290 290
291 devpriv->BADR2 = pci_resource_start(pcidev, 2); 291 dev->iobase = pci_resource_start(pcidev, 2);
292 devpriv->BADR3 = pci_resource_start(pcidev, 3); 292 devpriv->BADR3 = pci_resource_start(pcidev, 3);
293 293
294 ret = comedi_alloc_subdevices(dev, 4); 294 ret = comedi_alloc_subdevices(dev, 4);