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>
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];
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;
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);
}