Browse Source

nvidiafb: fix sparse warning

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>
Antonino A. Daplas 18 years ago
parent
commit
6cf059e1bb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/video/nvidia/nv_setup.c

+ 1 - 1
drivers/video/nvidia/nv_setup.c

@@ -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");
 	}