Skip to content

Commit

Permalink
pci: use pci_ioremap_bar() in drivers/ide
Browse files Browse the repository at this point in the history
Use the newly introduced pci_ioremap_bar() function in drivers/ide.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Arjan van de Ven authored and Bartlomiej Zolnierkiewicz committed Oct 23, 2008
1 parent 95a84cd commit 2834356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ide/sgiioc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)

/* Get the CmdBlk and CtrlBlk Base Registers */
bar0 = pci_resource_start(dev, 0);
virt_base = ioremap(bar0, pci_resource_len(dev, 0));
virt_base = pci_ioremap_bar(dev, 0);
if (virt_base == NULL) {
printk(KERN_ERR "%s: Unable to remap BAR 0 address: 0x%lx\n",
DRV_NAME, bar0);
Expand Down

0 comments on commit 2834356

Please sign in to comment.