/* PCI-DDA base addresses */
#define DIGITALIO_BADRINDEX 2
- // DIGITAL I/O is devpriv->pci_dev->base_address[2]
+ // DIGITAL I/O is pci_dev->resource[2]
#define DIGITALIO_SIZE 8
// DIGITAL I/O uses 8 I/O port addresses
#define DAC_BADRINDEX 3
- // DAC is devpriv->pci_dev->base_address[3]
+ // DAC is pci_dev->resource[3]
/* Digital I/O registers */
#define PORT1A 0 // PORT 1A DATA
result = alloc_subdevices(dev);
if(result<0)goto out;
-#if LINUX_VERSION_CODE < 0x020300
- devpriv->plx = ioremap(card->base_address[0], DAQBOARD2000_PLX_SIZE);
- devpriv->daq = ioremap(card->base_address[2], DAQBOARD2000_DAQ_SIZE);
-#else
- devpriv->plx = ioremap(card->resource[0].start, DAQBOARD2000_PLX_SIZE);
- devpriv->daq = ioremap(card->resource[2].start, DAQBOARD2000_DAQ_SIZE);
-#endif
+ devpriv->plx = ioremap(pci_resource_start(card,0), DAQBOARD2000_PLX_SIZE);
+ devpriv->daq = ioremap(pci_resource_start(card,2), DAQBOARD2000_DAQ_SIZE);
readl(devpriv->plx + 0x6c);
/*
ret = pci_enable_device(devpriv->pci_dev);
if(ret<0)return ret;
-#if LINUX_VERSION_CODE < 0x020300
- addr=devpriv->pci_dev->base_address[0];
-#else
- addr=devpriv->pci_dev->resource[0].start;
-#endif
+ addr=pci_resource_start(devpriv->pci_dev,0);
devpriv->phys_addr=addr;
offset = devpriv->phys_addr & ~PAGE_MASK;
devpriv->io_addr = ioremap(devpriv->phys_addr & PAGE_MASK, DT3000_SIZE + offset )