Commit 895bf69b authored by Antonino A. Daplas's avatar Antonino A. Daplas Committed by Linus Torvalds

rivafb: fix IO access

Fix IO access, with the following sparse warnings:

drivers/video/riva/fbdev.c:320:25: warning: dereference of noderef expression
drivers/video/riva/fbdev.c:321:29: warning: dereference of noderef expression
drivers/video/riva/fbdev.c:327:18: warning: dereference of noderef expression
drivers/video/riva/fbdev.c:328:15: warning: dereference of noderef expression
Signed-off-by: default avatarAntonino Daplas <adaplas@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6cf059e1
...@@ -317,15 +317,15 @@ static int riva_bl_update_status(struct backlight_device *bd) ...@@ -317,15 +317,15 @@ static int riva_bl_update_status(struct backlight_device *bd)
else else
level = bd->props.brightness; level = bd->props.brightness;
tmp_pmc = par->riva.PMC[0x10F0/4] & 0x0000FFFF; tmp_pmc = NV_RD32(par->riva.PMC, 0x10F0) & 0x0000FFFF;
tmp_pcrt = par->riva.PCRTC0[0x081C/4] & 0xFFFFFFFC; tmp_pcrt = NV_RD32(par->riva.PCRTC0, 0x081C) & 0xFFFFFFFC;
if(level > 0) { if(level > 0) {
tmp_pcrt |= 0x1; tmp_pcrt |= 0x1;
tmp_pmc |= (1 << 31); /* backlight bit */ tmp_pmc |= (1 << 31); /* backlight bit */
tmp_pmc |= riva_bl_get_level_brightness(par, level) << 16; /* level */ tmp_pmc |= riva_bl_get_level_brightness(par, level) << 16; /* level */
} }
par->riva.PCRTC0[0x081C/4] = tmp_pcrt; NV_WR32(par->riva.PCRTC0, 0x081C, tmp_pcrt);
par->riva.PMC[0x10F0/4] = tmp_pmc; NV_WR32(par->riva.PMC, 0x10F0, tmp_pmc);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment