From: David Schleef Date: Sun, 10 Feb 2002 05:05:07 +0000 (+0000) Subject: Convert to pci_resource_start() X-Git-Tag: r0_7_64~126 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4096e25283e52ba373353aea9c94a91df4313766;p=comedi.git Convert to pci_resource_start() --- diff --git a/comedi/drivers/cb_pcidda.c b/comedi/drivers/cb_pcidda.c index 1627c2fe..80a29e8b 100644 --- a/comedi/drivers/cb_pcidda.c +++ b/comedi/drivers/cb_pcidda.c @@ -71,11 +71,11 @@ PLEASE REPORT IF YOU ARE USING IT WITH A DIFFERENT CARD /* 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 diff --git a/comedi/drivers/daqboard2000.c b/comedi/drivers/daqboard2000.c index 1d78e063..fc675ee4 100644 --- a/comedi/drivers/daqboard2000.c +++ b/comedi/drivers/daqboard2000.c @@ -745,13 +745,8 @@ static int daqboard2000_attach(comedi_device *dev, comedi_devconfig *it) 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); /* diff --git a/comedi/drivers/dt3000.c b/comedi/drivers/dt3000.c index fc1d020e..74d29c17 100644 --- a/comedi/drivers/dt3000.c +++ b/comedi/drivers/dt3000.c @@ -571,11 +571,7 @@ static int setup_pci(comedi_device *dev) 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 )