staging: comedi: gsc_hpdi: don't store physical base addresses
authorIan Abbott <abbotti@mev.co.uk>
Thu, 1 Nov 2012 16:28:29 +0000 (16:28 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Nov 2012 19:33:22 +0000 (12:33 -0700)
commit594985d6615cc214dbfaf18fb6325d89a3c82e84
tree46dda92bc2c55cf75d52643bc2af04706b38f723
parentfd67ad4433a91c6c14188d5250ebdd86d4995f79
staging: comedi: gsc_hpdi: don't store physical base addresses

In `struct hpdi_private`, the `plx9080_phys_iobase` and
`hpdi_phys_iobase` hold the physical memory addresses from the PCI
BARs used by this driver.  The physical addresses are only really needed
when ioremapping the resources when the device is being attached by
`hpdi_auto_attach()`.  A non-zero value of the `hpdi_phys_iobase` is
also used to indicate that a call to `comedi_pci_enable()` was
successful so that `comedi_pci_disable()` should be called when the
device is detached by `hpdi_detach()`.

Remove the `plx9080_phys_iobase` and `hpdi_phys_iobase` members and use
`dev->iobase` as a flag to indicate whether `comedi_pci_disable()` needs
to be called by `hpdi_detach()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/gsc_hpdi.c