Skip to content

Commit

Permalink
Char: applicom, use pci_resource_start
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Feb 8, 2008
1 parent 6da8089 commit 55b29a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/char/applicom.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,22 +206,23 @@ static int __init applicom_init(void)
if (pci_enable_device(dev))
return -EIO;

RamIO = ioremap(dev->resource[0].start, LEN_RAM_IO);
RamIO = ioremap(pci_resource_start(dev, 0), LEN_RAM_IO);

if (!RamIO) {
printk(KERN_INFO "ac.o: Failed to ioremap PCI memory "
"space at 0x%llx\n",
(unsigned long long)dev->resource[0].start);
(unsigned long long)pci_resource_start(dev, 0));
pci_disable_device(dev);
return -EIO;
}

printk(KERN_INFO "Applicom %s found at mem 0x%llx, irq %d\n",
applicom_pci_devnames[dev->device-1],
(unsigned long long)dev->resource[0].start,
(unsigned long long)pci_resource_start(dev, 0),
dev->irq);

boardno = ac_register_board(dev->resource[0].start, RamIO,0);
boardno = ac_register_board(pci_resource_start(dev, 0),
RamIO, 0);
if (!boardno) {
printk(KERN_INFO "ac.o: PCI Applicom device doesn't have correct signature.\n");
iounmap(RamIO);
Expand Down

0 comments on commit 55b29a7

Please sign in to comment.