pci: use pci_ioremap_bar() in drivers/serial
[sfrench/cifs-2.6.git] / drivers / serial / 8250_pci.c
index e371a9c15341e2598825affdbd2ef1d727dfbde7..a07015d646ddad5eb6743c5fa1e1bb281694d051 100644 (file)
@@ -398,8 +398,7 @@ static int sbs_init(struct pci_dev *dev)
 {
        u8 __iomem *p;
 
-       p = ioremap_nocache(pci_resource_start(dev, 0),
-                                               pci_resource_len(dev, 0));
+       p = pci_ioremap_bar(dev, 0);
 
        if (p == NULL)
                return -ENOMEM;
@@ -423,8 +422,7 @@ static void __devexit sbs_exit(struct pci_dev *dev)
 {
        u8 __iomem *p;
 
-       p = ioremap_nocache(pci_resource_start(dev, 0),
-                                       pci_resource_len(dev, 0));
+       p = pci_ioremap_bar(dev, 0);
        /* FIXME: What if resource_len < OCT_REG_CR_OFF */
        if (p != NULL)
                writeb(0, p + OCT_REG_CR_OFF);