rivafb: use constants instead of magic values

Started by Guido Guenther on Jul 22, 2006

Subsystems (2)

Maintainers (2)

DORMANTno replies

open the first message on its own page

Message details and related content
Hi,
this minor patch against current git uses (MIN/MAX)_LEVEL and
FB_(UN)BLANK instead of the valuees they are defined to. Please apply.
Cheers,
 -- Guido
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index 33dddba..2ae214b 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -389,8 +389,8 @@ #endif
 	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);
 
 	up(&bd->sem);
@@ -780,7 +780,7 @@ static void riva_load_video_mode(struct 
 	
 	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)
@@ -913,7 +913,7 @@ static void riva_load_video_mode(struct 
 	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();
 }
 
Signed-Off-By: Guido Guenther <agx@sigxcpu.org>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help