mfd: use pci_ioremap_bar() in sm501
authorArjan van de Ven <arjan@linux.intel.com>
Sun, 28 Sep 2008 23:14:52 +0000 (16:14 -0700)
committerSamuel Ortiz <samuel@sortiz.org>
Tue, 21 Oct 2008 23:21:24 +0000 (01:21 +0200)
Use the newly introduced pci_ioremap_bar() function in drivers/mfd.
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>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
drivers/mfd/sm501.c

index 220e437..4d9aaf9 100644 (file)
@@ -1625,8 +1625,7 @@ static int sm501_pci_probe(struct pci_dev *dev,
                goto err3;
        }
 
-       sm->regs = ioremap(pci_resource_start(dev, 1),
-                          pci_resource_len(dev, 1));
+       sm->regs = pci_ioremap_bar(dev, 1);
 
        if (sm->regs == NULL) {
                dev_err(&dev->dev, "cannot remap registers\n");