diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2007-05-08 03:38:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:29 -0400 |
commit | 895bf69b8f24907f0efa11d8e84a7eac8e47bdac (patch) | |
tree | 04494dc206341599331108a25c53380d59c3912a /drivers/video/riva | |
parent | 6cf059e1bb3c7aa56f2a4468136934863184ef51 (diff) |
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: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/riva')
-rw-r--r-- | drivers/video/riva/fbdev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 9e6ee1ffd9f3..19dff8dbe8af 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
@@ -317,15 +317,15 @@ static int riva_bl_update_status(struct backlight_device *bd) | |||
317 | else | 317 | else |
318 | level = bd->props.brightness; | 318 | level = bd->props.brightness; |
319 | 319 | ||
320 | tmp_pmc = par->riva.PMC[0x10F0/4] & 0x0000FFFF; | 320 | tmp_pmc = NV_RD32(par->riva.PMC, 0x10F0) & 0x0000FFFF; |
321 | tmp_pcrt = par->riva.PCRTC0[0x081C/4] & 0xFFFFFFFC; | 321 | tmp_pcrt = NV_RD32(par->riva.PCRTC0, 0x081C) & 0xFFFFFFFC; |
322 | if(level > 0) { | 322 | if(level > 0) { |
323 | tmp_pcrt |= 0x1; | 323 | tmp_pcrt |= 0x1; |
324 | tmp_pmc |= (1 << 31); /* backlight bit */ | 324 | tmp_pmc |= (1 << 31); /* backlight bit */ |
325 | tmp_pmc |= riva_bl_get_level_brightness(par, level) << 16; /* level */ | 325 | tmp_pmc |= riva_bl_get_level_brightness(par, level) << 16; /* level */ |
326 | } | 326 | } |
327 | par->riva.PCRTC0[0x081C/4] = tmp_pcrt; | 327 | NV_WR32(par->riva.PCRTC0, 0x081C, tmp_pcrt); |
328 | par->riva.PMC[0x10F0/4] = tmp_pmc; | 328 | NV_WR32(par->riva.PMC, 0x10F0, tmp_pmc); |
329 | 329 | ||
330 | return 0; | 330 | return 0; |
331 | } | 331 | } |