This variable is only used as a flag to indicate that the pci device
has been enabled and needs to be disabled in the detach. Use the
comedi_device 'iobase' for this and remove the private data variable.
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 s626_private {
void __iomem *base_addr;
- int got_regions;
short allocatedBuf;
uint8_t ai_cmd_running; /* ai_cmd is running */
uint8_t ai_continous; /* continous acquisition */
ret = comedi_pci_enable(pcidev, dev->board_name);
if (ret)
return ret;
- devpriv->got_regions = 1;
+ dev->iobase = 1; /* detach needs this */
resourceStart = pci_resource_start(pcidev, 0);
if (ret)
return ret;
- dev->iobase = (unsigned long)devpriv->base_addr;
dev->irq = pcidev->irq;
/* set up interrupt handler */
iounmap(devpriv->base_addr);
}
if (pcidev) {
- if (devpriv->got_regions)
+ if (dev->iobase)
comedi_pci_disable(pcidev);
}
}