Skip to contentSkip to conversation

atyfb: remove dead code

PATCH In review Olaf Hering 2 participants 2 messages Aug 26, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atyfb: remove dead code

Remove dead code.

---
 drivers/video/aty/atyfb_base.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/video/aty/atyfb_base.c +2 -4
@@ -2767,8 +2767,7 @@ static int atyfb_blank(int blank, struct
 	if (par->lock_blank || par->asleep)
 		return 0;
 
-#ifdef CONFIG_FB_ATY_BACKLIGHT
-#elif defined(CONFIG_FB_ATY_GENERIC_LCD)
+#ifdef CONFIG_FB_ATY_GENERIC_LCD
 	if (par->lcd_table && blank > FB_BLANK_NORMAL &&
 	    (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) {
 		u32 pm = aty_ld_lcd(POWER_MANAGEMENT, par);
@@ -2797,8 +2796,7 @@ static int atyfb_blank(int blank, struct
 	}
 	aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par);
 
-#ifdef CONFIG_FB_ATY_BACKLIGHT
-#elif defined(CONFIG_FB_ATY_GENERIC_LCD)
+#ifdef CONFIG_FB_ATY_GENERIC_LCD
 	if (par->lcd_table && blank <= FB_BLANK_NORMAL &&
 	    (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) {
 		u32 pm = aty_ld_lcd(POWER_MANAGEMENT, par);
#1 lore raw
Quoted 11 lines · Olaf Hering

Remove dead code.

---
 drivers/video/aty/atyfb_base.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

drivers/video/aty/atyfb_base.c static int atyfb_blank(int blank, struct · line 2773

Quoted 9 lines
drivers/video/aty/atyfb_base.c +1 -2
@@ -2767,8 +2767,7 @@ static int atyfb_blank(int blank, struct
 	if (par->lock_blank || par->asleep)
 		return 0;
 
-#ifdef CONFIG_FB_ATY_BACKLIGHT
-#elif defined(CONFIG_FB_ATY_GENERIC_LCD)
+#ifdef CONFIG_FB_ATY_GENERIC_LCD
 	if (par->lcd_table && blank > FB_BLANK_NORMAL &&
 	    (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) {
 		u32 pm = aty_ld_lcd(POWER_MANAGEMENT, par);

This will change the behavior of the code. I basically agree with the change because the current code will not control the backlight when the kernel is built with CONFIG_FB_ATY_BACKLIGHT but the system doesn't support the backlight interface (ie. non-pmac system). However someone should check that it doesn't cause problems for pmac users.

Signature · 9 lines
Ville Syrjälä
[email protected]
http://www.sci.fi/~syrjala/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/