aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-02-08 07:21:50 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:41 -0500
commit55b29a728e37ac4b87d09ba8da480f14bdec3b8d (patch)
tree7094aec32b98b68853d5608d21f87a4111d70953 /drivers
parent6da80894cc11b5c0d79130a194789bab043a9b4b (diff)
Char: applicom, use pci_resource_start
Use pci_resource_start instead of accessing pci_dev struct internals. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/applicom.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index 1f0b752e5de1..b0bb71b1fcf4 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -206,22 +206,23 @@ static int __init applicom_init(void)
206 if (pci_enable_device(dev)) 206 if (pci_enable_device(dev))
207 return -EIO; 207 return -EIO;
208 208
209 RamIO = ioremap(dev->resource[0].start, LEN_RAM_IO); 209 RamIO = ioremap(pci_resource_start(dev, 0), LEN_RAM_IO);
210 210
211 if (!RamIO) { 211 if (!RamIO) {
212 printk(KERN_INFO "ac.o: Failed to ioremap PCI memory " 212 printk(KERN_INFO "ac.o: Failed to ioremap PCI memory "
213 "space at 0x%llx\n", 213 "space at 0x%llx\n",
214 (unsigned long long)dev->resource[0].start); 214 (unsigned long long)pci_resource_start(dev, 0));
215 pci_disable_device(dev); 215 pci_disable_device(dev);
216 return -EIO; 216 return -EIO;
217 } 217 }
218 218
219 printk(KERN_INFO "Applicom %s found at mem 0x%llx, irq %d\n", 219 printk(KERN_INFO "Applicom %s found at mem 0x%llx, irq %d\n",
220 applicom_pci_devnames[dev->device-1], 220 applicom_pci_devnames[dev->device-1],
221 (unsigned long long)dev->resource[0].start, 221 (unsigned long long)pci_resource_start(dev, 0),
222 dev->irq); 222 dev->irq);
223 223
224 boardno = ac_register_board(dev->resource[0].start, RamIO,0); 224 boardno = ac_register_board(pci_resource_start(dev, 0),
225 RamIO, 0);
225 if (!boardno) { 226 if (!boardno) {
226 printk(KERN_INFO "ac.o: PCI Applicom device doesn't have correct signature.\n"); 227 printk(KERN_INFO "ac.o: PCI Applicom device doesn't have correct signature.\n");
227 iounmap(RamIO); 228 iounmap(RamIO);