nvidiafb: fix sparse warning
authorAntonino A. Daplas <adaplas@gmail.com>
Tue, 8 May 2007 07:38:41 +0000 (00:38 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:29 +0000 (11:15 -0700)
Fix the following sparse warning:

drivers/video/nvidia/nv_setup.c:659:20: warning: dereference of noderef expression

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/nvidia/nv_setup.c

index eab3e282a4de17f6bb736f64d3aa3aa78104a11c..336ddb0d10b8bc58aaa564650ed16cea1a33ac46 100644 (file)
@@ -656,7 +656,7 @@ int NVCommonSetup(struct fb_info *info)
        par->LVDS = 0;
        if (par->FlatPanel && par->twoHeads) {
                NV_WR32(par->PRAMDAC0, 0x08B0, 0x00010004);
-               if (par->PRAMDAC0[0x08b4] & 1)
+               if (NV_RD32(par->PRAMDAC0, 0x08b4) & 1)
                        par->LVDS = 1;
                printk("nvidiafb: Panel is %s\n", par->LVDS ? "LVDS" : "TMDS");
        }