summaryrefslogtreecommitdiffstats
path: root/drivers/video/via/viafbdev.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-05-19 15:50:58 +0800
committerJonathan Corbet <corbet@lwn.net>2010-04-20 14:23:18 -0600
commitb72a5070c74f5ca9a45a03c2d625daab66d0a820 (patch)
treef388d41f100b0c4a3b7ef6c41066201f8f9ed895 /drivers/video/via/viafbdev.c
parent109771a68bedda77606500dc14455eca92df6769 (diff)
downloadop-kernel-dev-b72a5070c74f5ca9a45a03c2d625daab66d0a820.zip
op-kernel-dev-b72a5070c74f5ca9a45a03c2d625daab66d0a820.tar.gz
viafb: use proper pci config API
This patch alters viafb to use the proper Linux in-kernel API to access PCI configuration space, rather than poking at I/O ports by itself. Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Diffstat (limited to 'drivers/video/via/viafbdev.c')
-rw-r--r--drivers/video/via/viafbdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index b7018ef..8af405b 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -1782,6 +1782,10 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
viafb_init_chip_info(pdev, ent);
viaparinfo->fbmem = pci_resource_start(pdev, 0);
viaparinfo->memsize = viafb_get_fb_size_from_pci();
+ if (viaparinfo->memsize < 0) {
+ rc = viaparinfo->memsize;
+ goto out_delete_i2c;
+ }
viaparinfo->fbmem_free = viaparinfo->memsize;
viaparinfo->fbmem_used = 0;
viafbinfo->screen_base = ioremap_nocache(viaparinfo->fbmem,
OpenPOWER on IntegriCloud