diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2009-01-06 14:42:28 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 15:59:26 -0800 |
commit | 3c36aa5ccdf516255ef2eac90dd948da891aa4bd (patch) | |
tree | 7930059e5ba51e0fe58fd902b3622664dcfee749 /drivers/video/geode/gxfb_core.c | |
parent | ab5dc372021def8f40b34761babecad0bf868b1c (diff) | |
download | kernel_goldelico_gta04-3c36aa5ccdf516255ef2eac90dd948da891aa4bd.zip kernel_goldelico_gta04-3c36aa5ccdf516255ef2eac90dd948da891aa4bd.tar.gz kernel_goldelico_gta04-3c36aa5ccdf516255ef2eac90dd948da891aa4bd.tar.bz2 |
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/geode/gxfb_core.c')
-rw-r--r-- | drivers/video/geode/gxfb_core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c index de2b8f9..4841189 100644 --- a/drivers/video/geode/gxfb_core.c +++ b/drivers/video/geode/gxfb_core.c @@ -242,23 +242,21 @@ static int __init gxfb_map_video_memory(struct fb_info *info, struct pci_dev *de ret = pci_request_region(dev, 3, "gxfb (video processor)"); if (ret < 0) return ret; - par->vid_regs = ioremap(pci_resource_start(dev, 3), - pci_resource_len(dev, 3)); + par->vid_regs = pci_ioremap_bar(dev, 3); if (!par->vid_regs) return -ENOMEM; ret = pci_request_region(dev, 2, "gxfb (display controller)"); if (ret < 0) return ret; - par->dc_regs = ioremap(pci_resource_start(dev, 2), pci_resource_len(dev, 2)); + par->dc_regs = pci_ioremap_bar(dev, 2); if (!par->dc_regs) return -ENOMEM; ret = pci_request_region(dev, 1, "gxfb (graphics processor)"); if (ret < 0) return ret; - par->gp_regs = ioremap(pci_resource_start(dev, 1), - pci_resource_len(dev, 1)); + par->gp_regs = pci_ioremap_bar(dev, 1); if (!par->gp_regs) return -ENOMEM; |