#include <linux/comedidev.h>
-#include <linux/pci.h> /* for PCI devices */
+#include "comedi_pci.h"
#define ADVANTECH_VENDOR 0x13fe /* Advantech PCI vendor ID */
* Look for device that isn't in use.
* Enable PCI device and request regions.
*/
- if (pci_enable_device(pcidev)) {
- errstr = "failed to enable PCI device!";
- continue;
- }
- if (pci_request_regions(pcidev, "adl_pci1723")) {
- errstr = "in use or I/O port conflict!";
+ if (comedi_pci_enable(pcidev, "adv_pci1723")) {
+ errstr = "failed to enable PCI device and request regions!";
continue;
}
break;
if (devpriv->pcidev) {
if (dev->iobase) {
- pci_release_regions(devpriv->pcidev);
- pci_disable_device(devpriv->pcidev);
+ comedi_pci_disable(devpriv->pcidev);
}
pci_dev_put(devpriv->pcidev);
}