summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-07-18 18:58:24 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-19 16:51:36 -0700
commit2d49c815233f8c6a7977c0cf7539849aa51cb633 (patch)
tree810850ec251a655e375ebdc284e49bcc4a195391 /drivers
parent5512a35b38f9cafc217ad123f9e8eea12c585208 (diff)
downloadlinux-3.10-2d49c815233f8c6a7977c0cf7539849aa51cb633.tar.gz
linux-3.10-2d49c815233f8c6a7977c0cf7539849aa51cb633.tar.bz2
linux-3.10-2d49c815233f8c6a7977c0cf7539849aa51cb633.zip
staging: comedi: dt3000: remove 'phys_addr' from the private data
The 'phys_addr' variable in the private data is simply used as a flag for the detach function to know that the pci device has been enabled. Use the 'dev->iobase' variable instead as is more typical for other comedi pci drivers. 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/dt3000.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c
index 92558e7495f..3937e87963e 100644
--- a/drivers/staging/comedi/drivers/dt3000.c
+++ b/drivers/staging/comedi/drivers/dt3000.c
@@ -250,7 +250,6 @@ static const struct dt3k_boardtype dt3k_boardtypes[] = {
struct dt3k_private {
struct pci_dev *pci_dev;
- resource_size_t phys_addr;
void __iomem *io_addr;
unsigned int lock;
unsigned int ao_readback[2];
@@ -824,8 +823,8 @@ static int dt3000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (ret < 0)
return ret;
- devpriv->phys_addr = pci_resource_start(pcidev, 0);
- devpriv->io_addr = ioremap(devpriv->phys_addr, DT3000_SIZE);
+ dev->iobase = pci_resource_start(pcidev, 0);
+ devpriv->io_addr = ioremap(dev->iobase, DT3000_SIZE);
if (!devpriv->io_addr)
return -ENOMEM;
@@ -905,7 +904,7 @@ static void dt3000_detach(struct comedi_device *dev)
free_irq(dev->irq, dev);
if (devpriv) {
if (devpriv->pci_dev) {
- if (devpriv->phys_addr)
+ if (dev->iobase)
comedi_pci_disable(devpriv->pci_dev);
pci_dev_put(devpriv->pci_dev);
}