/**
* comedi_pci_disable() - Release the regions and disable the PCI device.
- * @pcidev: pci_dev struct
- *
- * This must be matched with a previous successful call to comedi_pci_enable().
+ * @dev: comedi_device struct
*/
-void comedi_pci_disable(struct pci_dev *pcidev)
+void comedi_pci_disable(struct comedi_device *dev)
{
- pci_release_regions(pcidev);
- pci_disable_device(pcidev);
+ struct pci_dev *pcidev = comedi_to_pci_dev(dev);
+
+ if (pcidev && dev->iobase) {
+ pci_release_regions(pcidev);
+ pci_disable_device(pcidev);
+ }
}
EXPORT_SYMBOL_GPL(comedi_pci_disable);
struct pci_dev *comedi_to_pci_dev(struct comedi_device *);
int comedi_pci_enable(struct pci_dev *, const char *);
-void comedi_pci_disable(struct pci_dev *);
+void comedi_pci_disable(struct comedi_device *);
int comedi_pci_auto_config(struct pci_dev *, struct comedi_driver *,
unsigned long context);
return -ENOSYS;
}
-static inline void comedi_pci_disable(struct pci_dev *dev)
+static inline void comedi_pci_disable(struct comedi_device *dev)
{
}
static void pci_8255_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
const struct pci_8255_boardinfo *board = comedi_board(dev);
struct pci_8255_private *devpriv = dev->private;
struct comedi_subdevice *s;
subdev_8255_cleanup(dev, s);
}
}
- if (pcidev) {
- if (devpriv->mmio_base)
- iounmap(devpriv->mmio_base);
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ if (devpriv->mmio_base)
+ iounmap(devpriv->mmio_base);
+ comedi_pci_disable(dev);
}
static struct comedi_driver pci_8255_driver = {
static void i_ADDI_Detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct addi_private *devpriv = dev->private;
if (devpriv) {
if (devpriv->dw_AiBase)
iounmap(devpriv->dw_AiBase);
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static void apci1032_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->iobase)
apci1032_reset(dev);
if (dev->irq)
free_irq(dev->irq, dev);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver apci1032_driver = {
static void apci1516_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->iobase)
apci1516_reset(dev);
if (dev->subdevices)
addi_watchdog_cleanup(&dev->subdevices[2]);
- if (dev->iobase)
- comedi_pci_disable(pcidev);
+ comedi_pci_disable(dev);
}
static struct comedi_driver apci1516_driver = {
return 0;
}
-static void apci16xx_detach(struct comedi_device *dev)
-{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
-}
-
static struct comedi_driver apci16xx_driver = {
.driver_name = "addi_apci_16xx",
.module = THIS_MODULE,
.auto_attach = apci16xx_auto_attach,
- .detach = apci16xx_detach,
+ .detach = comedi_pci_disable,
};
static int apci16xx_pci_probe(struct pci_dev *dev,
static void apci1710_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->iobase)
i_APCI1710_Reset(dev);
if (dev->irq)
free_irq(dev->irq, dev);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver apci1710_driver = {
static void apci2032_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->iobase)
apci2032_reset(dev);
if (dev->irq)
kfree(dev->read_subdev->private);
if (dev->subdevices)
addi_watchdog_cleanup(&dev->subdevices[1]);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver apci2032_driver = {
static void apci2200_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->iobase)
apci2200_reset(dev);
if (dev->subdevices)
addi_watchdog_cleanup(&dev->subdevices[2]);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver apci2200_driver = {
static void apci3120_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct addi_private *devpriv = dev->private;
if (devpriv) {
devpriv->ui_DmaBufferPages[1]);
}
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver apci3120_driver = {
static void apci3501_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->iobase)
apci3501_reset(dev);
if (dev->irq)
free_irq(dev->irq, dev);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver apci3501_driver = {
return 0;
}
-static void pci6208_detach(struct comedi_device *dev)
-{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
-}
-
static struct comedi_driver adl_pci6208_driver = {
.driver_name = "adl_pci6208",
.module = THIS_MODULE,
.auto_attach = pci6208_auto_attach,
- .detach = pci6208_detach,
+ .detach = comedi_pci_disable,
};
static int adl_pci6208_pci_probe(struct pci_dev *dev,
return 0;
}
-static void adl_pci7x3x_detach(struct comedi_device *dev)
-{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
-}
-
static struct comedi_driver adl_pci7x3x_driver = {
.driver_name = "adl_pci7x3x",
.module = THIS_MODULE,
.auto_attach = adl_pci7x3x_auto_attach,
- .detach = adl_pci7x3x_detach,
+ .detach = comedi_pci_disable,
};
static int adl_pci7x3x_pci_probe(struct pci_dev *dev,
return 0;
}
-static void adl_pci8164_detach(struct comedi_device *dev)
-{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
-}
-
static struct comedi_driver adl_pci8164_driver = {
.driver_name = "adl_pci8164",
.module = THIS_MODULE,
.auto_attach = adl_pci8164_auto_attach,
- .detach = adl_pci8164_detach,
+ .detach = comedi_pci_disable,
};
static int adl_pci8164_pci_probe(struct pci_dev *dev,
static void pci9111_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->iobase)
pci9111_reset(dev);
if (dev->irq != 0)
free_irq(dev->irq, dev);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver adl_pci9111_driver = {
free_pages((unsigned long)devpriv->dmabuf_virt[1],
devpriv->dmabuf_pages[1]);
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
-
+ comedi_pci_disable(dev);
+ if (pcidev)
pci_dev_put(pcidev);
- }
}
static struct comedi_driver adl_pci9118_driver = {
static void pci1710_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->iobase)
pci1710_reset(dev);
if (dev->irq)
free_irq(dev->irq, dev);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver adv_pci1710_driver = {
static void pci1723_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
- if (pcidev) {
- if (dev->iobase) {
- pci1723_reset(dev);
- comedi_pci_disable(pcidev);
- }
- }
+ if (dev->iobase)
+ pci1723_reset(dev);
+ comedi_pci_disable(dev);
}
static struct comedi_driver adv_pci1723_driver = {
return 0;
}
-static void adv_pci1724_detach(struct comedi_device *dev)
-{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
- if (pcidev && dev->iobase) {
- comedi_pci_disable(pcidev);
- dev_info(dev->class_dev, "detached\n");
- }
-}
-
static struct comedi_driver adv_pci1724_driver = {
.driver_name = "adv_pci1724",
.module = THIS_MODULE,
.auto_attach = adv_pci1724_auto_attach,
- .detach = adv_pci1724_detach,
+ .detach = comedi_pci_disable,
};
static int adv_pci1724_pci_probe(struct pci_dev *dev,
static void pci_dio_detach(struct comedi_device *dev)
{
struct pci_dio_private *devpriv = dev->private;
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct comedi_subdevice *s;
int i;
s->private = NULL;
}
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver adv_pci_dio_driver = {
release_region(devpriv->io.u.iobase,
thisboard->mainsize);
} else if (is_pci_board(thisboard)) {
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
- if (pcidev) {
- if (devpriv->io.regtype != no_regtype) {
- if (devpriv->io.regtype == mmio_regtype)
- iounmap(devpriv->io.u.membase);
- comedi_pci_disable(pcidev);
- }
- }
+ if (devpriv->io.regtype == mmio_regtype)
+ iounmap(devpriv->io.u.membase);
+ comedi_pci_disable(dev);
}
}
release_region(dev->iobase, PC236_IO_SIZE);
} else if (is_pci_board(thisboard)) {
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
+ comedi_pci_disable(dev);
+ if (pcidev)
pci_dev_put(pcidev);
- }
}
}
release_region(dev->iobase, PC263_IO_SIZE);
} else if (is_pci_board(thisboard)) {
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
+ comedi_pci_disable(dev);
+ if (pcidev)
pci_dev_put(pcidev);
- }
}
}
kfree(devpriv->ao_scan_vals);
kfree(devpriv->ao_scan_order);
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
+ comedi_pci_disable(dev);
+ if (pcidev)
pci_dev_put(pcidev);
- }
}
static struct comedi_driver amplc_pci224_driver = {
subdev_8255_cleanup(dev, &dev->subdevices[2]);
if (dev->irq)
free_irq(dev->irq, dev);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
+ comedi_pci_disable(dev);
+ if (pcidev)
pci_dev_put(pcidev);
- }
}
static struct comedi_driver amplc_pci230_driver = {
ret = comedi_pci_enable(pcidev, dev->board_name);
if (ret)
return ret;
+ dev->iobase = 1;
devpriv->s5933_config = pci_resource_start(pcidev, 0);
devpriv->control_status = pci_resource_start(pcidev, 1);
static void cb_pcidas_detach(struct comedi_device *dev)
{
struct cb_pcidas_private *devpriv = dev->private;
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
if (devpriv) {
if (devpriv->s5933_config) {
free_irq(dev->irq, dev);
if (dev->subdevices)
subdev_8255_cleanup(dev, &dev->subdevices[2]);
- if (pcidev) {
- if (devpriv->s5933_config)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver cb_pcidas_driver = {
}
if (dev->subdevices)
subdev_8255_cleanup(dev, &dev->subdevices[4]);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver cb_pcidas64_driver = {
static void cb_pcidda_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->subdevices) {
subdev_8255_cleanup(dev, &dev->subdevices[1]);
subdev_8255_cleanup(dev, &dev->subdevices[2]);
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver cb_pcidda_driver = {
static void cb_pcimdas_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->irq)
free_irq(dev->irq, dev);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver cb_pcimdas_driver = {
static void cb_pcimdda_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->subdevices)
subdev_8255_cleanup(dev, &dev->subdevices[1]);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver cb_pcimdda_driver = {
return 0;
}
-static void contec_detach(struct comedi_device *dev)
-{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
-}
-
static struct comedi_driver contec_pci_dio_driver = {
.driver_name = "contec_pci_dio",
.module = THIS_MODULE,
.auto_attach = contec_auto_attach,
- .detach = contec_detach,
+ .detach = comedi_pci_disable,
};
static int contec_pci_dio_pci_probe(struct pci_dev *dev,
static void daqboard2000_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct daqboard2000_private *devpriv = dev->private;
if (dev->subdevices)
if (devpriv->plx)
iounmap(devpriv->plx);
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- pci_dev_put(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver daqboard2000_driver = {
static void das08_pci_detach(struct comedi_device *dev)
{
- struct pci_dev *pdev = comedi_to_pci_dev(dev);
-
das08_common_detach(dev);
- if (dev->iobase)
- comedi_pci_disable(pdev);
+ comedi_pci_disable(dev);
}
static struct comedi_driver das08_pci_comedi_driver = {
static void dt3000_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct dt3k_private *devpriv = dev->private;
if (dev->irq)
if (devpriv->io_addr)
iounmap(devpriv->io_addr);
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver dt3000_driver = {
static void dyna_pci10xx_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct dyna_pci10xx_private *devpriv = dev->private;
if (devpriv)
mutex_destroy(&devpriv->mutex);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver dyna_pci10xx_driver = {
NUM_DMA_DESCRIPTORS,
devpriv->dma_desc,
devpriv->dma_desc_phys_addr);
- if (dev->iobase)
- comedi_pci_disable(pcidev);
}
+ comedi_pci_disable(dev);
}
static int dio_config_block_size(struct comedi_device *dev, unsigned int *data)
static void icp_multi_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct icp_multi_private *devpriv = dev->private;
if (devpriv)
free_irq(dev->irq, dev);
if (devpriv && devpriv->io_addr)
iounmap(devpriv->io_addr);
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver icp_multi_driver = {
static void jr3_pci_detach(struct comedi_device *dev)
{
int i;
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct jr3_pci_dev_private *devpriv = dev->private;
if (devpriv) {
}
if (devpriv->iobase)
iounmap(devpriv->iobase);
- if (dev->iobase)
- comedi_pci_disable(pcidev);
}
+ comedi_pci_disable(dev);
}
static struct comedi_driver jr3_pci_driver = {
return 0;
}
-static void cnt_detach(struct comedi_device *dev)
-{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
-}
-
static struct comedi_driver ke_counter_driver = {
.driver_name = "ke_counter",
.module = THIS_MODULE,
.auto_attach = cnt_auto_attach,
- .detach = cnt_detach,
+ .detach = comedi_pci_disable,
};
static int ke_counter_pci_probe(struct pci_dev *dev,
static void me4000_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-
if (dev->irq)
free_irq(dev->irq, dev);
- if (pcidev) {
- if (dev->iobase) {
- me4000_reset(dev);
- comedi_pci_disable(pcidev);
- }
- }
+ if (dev->iobase)
+ me4000_reset(dev);
+ comedi_pci_disable(dev);
}
static struct comedi_driver me4000_driver = {
static void me_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct me_private_data *dev_private = dev->private;
if (dev_private) {
if (dev_private->plx_regbase)
iounmap(dev_private->plx_regbase);
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver me_daq_driver = {
iounmap(mite->daq_io_addr);
mite->daq_io_addr = NULL;
}
- if (mite->mite_phys_addr) {
- comedi_pci_disable(mite->pcidev);
+ if (mite->mite_phys_addr)
mite->mite_phys_addr = 0;
- }
}
EXPORT_SYMBOL(mite_unsetup);
dev_err(dev->class_dev, "error setting up mite\n");
return ret;
}
+ dev->iobase = 1;
dev_info(dev->class_dev, "board: %s, ID=0x%02x\n", dev->board_name,
readb(devpriv->mite->daq_io_addr + ID_Register));
mite_unsetup(devpriv->mite);
mite_free(devpriv->mite);
}
+ comedi_pci_disable(dev);
}
static struct comedi_driver ni6527_driver = {
dev_warn(dev->class_dev, "error setting up mite\n");
return ret;
}
+ dev->iobase = 1;
dev->irq = mite_irq(devpriv->mite);
dev_info(dev->class_dev, "board: %s, ID=0x%02x", dev->board_name,
mite_free(devpriv->mite);
}
}
+ comedi_pci_disable(dev);
}
static struct comedi_driver ni_65xx_driver = {
dev_warn(dev->class_dev, "error setting up mite\n");
return ret;
}
+ dev->iobase = 1;
ret = ni_660x_alloc_mite_rings(dev);
if (ret < 0)
mite_free(devpriv->mite);
}
}
+ comedi_pci_disable(dev);
}
static struct comedi_driver ni_660x_driver = {
dev_warn(dev->class_dev, "error setting up mite\n");
return ret;
}
+ dev->iobase = 1;
ret = comedi_alloc_subdevices(dev, 2);
if (ret)
mite_unsetup(devpriv->mite);
mite_free(devpriv->mite);
}
+ comedi_pci_disable(dev);
}
static struct comedi_driver ni_670x_driver = {
ret = mite_setup(devpriv->mite);
if (ret < 0)
return ret;
+ dev->iobase = 1;
iobase = (unsigned long)devpriv->mite->daq_io_addr;
irq = mite_irq(devpriv->mite);
return labpc_common_attach(dev, iobase, irq, 0);
mite_unsetup(devpriv->mite);
mite_free(devpriv->mite);
}
+ comedi_pci_disable(dev);
#endif
};
EXPORT_SYMBOL_GPL(labpc_common_detach);
dev_warn(dev->class_dev, "error setting up mite\n");
return ret;
}
+ dev->iobase = 1;
devpriv->di_mite_ring = mite_alloc_ring(devpriv->mite);
if (devpriv->di_mite_ring == NULL)
mite_free(devpriv->mite);
}
}
+ comedi_pci_disable(dev);
}
static struct comedi_driver ni_pcidio_driver = {
mite_free(devpriv->mite);
}
}
+ comedi_pci_disable(dev);
}
static int pcimio_auto_attach(struct comedi_device *dev,
pr_warn("error setting up mite\n");
return ret;
}
+ dev->iobase = 1;
devpriv->ai_mite_ring = mite_alloc_ring(devpriv->mite);
if (devpriv->ai_mite_ring == NULL)
static void rtd_detach(struct comedi_device *dev)
{
struct rtdPrivate *devpriv = dev->private;
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
if (devpriv) {
/* Shut down any board ops by resetting it */
if (devpriv->lcfg)
iounmap(devpriv->lcfg);
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver rtd520_driver = {
static void s626_detach(struct comedi_device *dev)
{
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct s626_private *devpriv = dev->private;
if (devpriv) {
if (devpriv->base_addr)
iounmap(devpriv->base_addr);
}
- if (pcidev) {
- if (dev->iobase)
- comedi_pci_disable(pcidev);
- }
+ comedi_pci_disable(dev);
}
static struct comedi_driver s626_driver = {
{
const struct skel_board *thisboard = comedi_board(dev);
struct skel_private *devpriv = dev->private;
- struct pci_dev *pcidev = comedi_to_pci_dev(dev);
if (!thisboard || !devpriv)
return;
* If PCI device enabled by _auto_attach() (or _attach()),
* disable it here.
*/
- if (pcidev && dev->iobase)
- comedi_pci_disable(pcidev);
+ comedi_pci_disable(dev);
} else {
/*
* ISA board