Skip to content

Commit

Permalink
[PATCH] rivafb: use constants instead of magic values
Browse files Browse the repository at this point in the history
use (MIN/MAX)_LEVEL and FB_(UN)BLANK instead of the values they are defined to

Signed-off-by: Guido Guenther <[email protected]>
Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
agx authored and Linus Torvalds committed Oct 3, 2006
1 parent 6bf1d73 commit 535a09a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/video/riva/fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ static void riva_bl_init(struct riva_par *par)
mutex_lock(&info->bl_mutex);
info->bl_dev = bd;
fb_bl_default_curve(info, 0,
0x158 * FB_BACKLIGHT_MAX / MAX_LEVEL,
0x534 * FB_BACKLIGHT_MAX / MAX_LEVEL);
MIN_LEVEL * FB_BACKLIGHT_MAX / MAX_LEVEL,
FB_BACKLIGHT_MAX);
mutex_unlock(&info->bl_mutex);

down(&bd->sem);
Expand Down Expand Up @@ -784,7 +784,7 @@ static void riva_load_video_mode(struct fb_info *info)

NVTRACE_ENTER();
/* time to calculate */
rivafb_blank(1, info);
rivafb_blank(FB_BLANK_NORMAL, info);

bpp = info->var.bits_per_pixel;
if (bpp == 16 && info->var.green.length == 5)
Expand Down Expand Up @@ -917,7 +917,7 @@ static void riva_load_video_mode(struct fb_info *info)
par->current_state = newmode;
riva_load_state(par, &par->current_state);
par->riva.LockUnlock(&par->riva, 0); /* important for HW cursor */
rivafb_blank(0, info);
rivafb_blank(FB_BLANK_UNBLANK, info);
NVTRACE_LEAVE();
}

Expand Down

0 comments on commit 535a09a

Please sign in to comment.