aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/8250_pci.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-06-24 13:34:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-24 12:55:50 -0400
commit24ed3abaa13a9499d7454a1ed9830bb53b689b94 (patch)
tree3bcb33742f8674a7f8dc5e744357b3b836753858 /drivers/serial/8250_pci.c
parentce89294c056805019d8369b3b74bb52ef51b4708 (diff)
pci: use pci_ioremap_bar() in drivers/serial
Use the newly introduced pci_ioremap_bar() function in drivers/serial. 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial/8250_pci.c')
-rw-r--r--drivers/serial/8250_pci.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index e371a9c15341..a07015d646dd 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -398,8 +398,7 @@ static int sbs_init(struct pci_dev *dev)
398{ 398{
399 u8 __iomem *p; 399 u8 __iomem *p;
400 400
401 p = ioremap_nocache(pci_resource_start(dev, 0), 401 p = pci_ioremap_bar(dev, 0);
402 pci_resource_len(dev, 0));
403 402
404 if (p == NULL) 403 if (p == NULL)
405 return -ENOMEM; 404 return -ENOMEM;
@@ -423,8 +422,7 @@ static void __devexit sbs_exit(struct pci_dev *dev)
423{ 422{
424 u8 __iomem *p; 423 u8 __iomem *p;
425 424
426 p = ioremap_nocache(pci_resource_start(dev, 0), 425 p = pci_ioremap_bar(dev, 0);
427 pci_resource_len(dev, 0));
428 /* FIXME: What if resource_len < OCT_REG_CR_OFF */ 426 /* FIXME: What if resource_len < OCT_REG_CR_OFF */
429 if (p != NULL) 427 if (p != NULL)
430 writeb(0, p + OCT_REG_CR_OFF); 428 writeb(0, p + OCT_REG_CR_OFF);