summaryrefslogtreecommitdiff
path: root/drivers/video/gxt4500.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-01-07 01:42:28 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 02:59:26 +0300
commit3c36aa5ccdf516255ef2eac90dd948da891aa4bd (patch)
tree7930059e5ba51e0fe58fd902b3622664dcfee749 /drivers/video/gxt4500.c
parentab5dc372021def8f40b34761babecad0bf868b1c (diff)
downloadlinux-3c36aa5ccdf516255ef2eac90dd948da891aa4bd.tar.xz
pci: use pci_ioremap_bar() in drivers/video
Use the newly introduced pci_ioremap_bar() function in drivers/video. 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> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/gxt4500.c')
-rw-r--r--drivers/video/gxt4500.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c
index 564557792bed..896e53dea906 100644
--- a/drivers/video/gxt4500.c
+++ b/drivers/video/gxt4500.c
@@ -648,7 +648,7 @@ static int __devinit gxt4500_probe(struct pci_dev *pdev,
info->pseudo_palette = par->pseudo_palette;
info->fix.mmio_start = reg_phys;
- par->regs = ioremap(reg_phys, pci_resource_len(pdev, 0));
+ par->regs = pci_ioremap_bar(pdev, 0);
if (!par->regs) {
dev_err(&pdev->dev, "gxt4500: cannot map registers\n");
goto err_free_all;
@@ -656,7 +656,7 @@ static int __devinit gxt4500_probe(struct pci_dev *pdev,
info->fix.smem_start = fb_phys;
info->fix.smem_len = pci_resource_len(pdev, 1);
- info->screen_base = ioremap(fb_phys, pci_resource_len(pdev, 1));
+ info->screen_base = pci_ioremap_bar(pdev, 1);
if (!info->screen_base) {
dev_err(&pdev->dev, "gxt4500: cannot map framebuffer\n");
goto err_unmap_regs;