linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] atyfb: remove dead code
       [not found] <20070826091237.GA17667@aepfle.de>
@ 2007-08-26 15:36 ` Ville Syrjälä
  0 siblings, 0 replies; 2+ messages in thread
From: Ville Syrjälä @ 2007-08-26 15:36 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Andrew Morton, linux-fbdev-devel, linux-kernel

On Sun, Aug 26, 2007 at 11:12:37AM +0200, Olaf Hering wrote:
> Remove dead code.
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> 
> ---
>  drivers/video/aty/atyfb_base.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> --- a/drivers/video/aty/atyfb_base.c
> +++ b/drivers/video/aty/atyfb_base.c
> @@ -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.

-- 
Ville Syrjälä
syrjala@sci.fi
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] atyfb: Remove dead code.
  2008-06-04  9:14 ` [PATCH] fbdev: xoffset, yoffset and yres " Ville Syrjala
@ 2008-06-04  9:14   ` Ville Syrjala
  0 siblings, 0 replies; 2+ messages in thread
From: Ville Syrjala @ 2008-06-04  9:14 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Ville Syrjala, akpm, Olaf Hering, adaplas

From: Olaf Hering <olaf@aepfle.de>

Remove dead code. This will slightly change the behaviour of the driver
on systems that support backlight control. Previously they would just
turn the backlight off using the backlight control but now the generic
LCD code will also turn off the LCD using the POWER_MANAGEMENT register.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Ville Syrjala <syrjala@sci.fi>
---
Nobody has come forward to test this on one of the affected systems
(ie. pmac laptops that support backlight control) so let's just put it
in. It really shouldn't break anything and it helps if some non-pmac
user has unwittingly configured his kernel with CONFIG_FB_ATY_BACKLIGHT.

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

diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index bd4ac0b..d7ba3f1 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -2709,8 +2709,7 @@ static int atyfb_blank(int blank, struct fb_info *info)
 	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);
@@ -2739,8 +2738,7 @@ static int atyfb_blank(int blank, struct fb_info *info)
 	}
 	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.5.3.7


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-04  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070826091237.GA17667@aepfle.de>
2007-08-26 15:36 ` [PATCH] atyfb: remove dead code Ville Syrjälä
2008-06-04  9:14 [PATCH] fbdev: width and height are unsigned Ville Syrjala
2008-06-04  9:14 ` [PATCH] fbdev: xoffset, yoffset and yres " Ville Syrjala
2008-06-04  9:14   ` [PATCH] atyfb: Remove dead code Ville Syrjala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).