Skip to contentSkip to conversation

nvidiafb: Fix sparse warning

PATCH In review Antonino A. Daplas 1 participant 1 message Apr 25, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 7/41 nvidiafb: Fix sparse warning

Fix the following sparse warning:

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

---

 drivers/video/nvidia/nv_setup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/nvidia/nv_setup.c +1 -1
index eab3e28..336ddb0 100644
@@ -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");
 	}

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/