diff options
author | Michael Hanselmann <linux-kernel@hansmi.ch> | 2006-07-10 07:44:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:20 -0400 |
commit | e01af0384f54023b4548b7742952da2ffcafd4cd (patch) | |
tree | 6ffd14821a0a1fedbf4430c5df7fa60822f4809f /drivers/video/chipsfb.c | |
parent | 58d383a6222d66be9483598c51bae34e7d3c2c37 (diff) |
[PATCH] powermac: Combined fixes for backlight code
This patch fixes several problems:
- pmac_backlight_key() is called under interrupt context, and therefore
can't use mutexes or semaphores, so defer the backlight level for
later, as it's not critical (original code by Aristeu S. Rozanski F.
<aris@valeta.org>).
- Add exports for functions that might be called from modules
- Fix Kconfig depdencies on PMAC_BACKLIGHT.
- Fix locking issues on calls from inside the driver (reported by
Aristeu S. Rozanski F., too)
- Fix wrong calculation of backlight values in some of the drivers
- Replace pmac_backlight_key_up/down by inline functions
[akpm@osdl.org: fix function prototypes]
Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Acked-by: Aristeu S. Rozanski F. <aris@valeta.org>
Acked-by: Rene Nussbaumer <linux-kernel@killerfox.forkbomb.ch>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/chipsfb.c')
-rw-r--r-- | drivers/video/chipsfb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c index eba9d93ae360..73cb426bf2d7 100644 --- a/drivers/video/chipsfb.c +++ b/drivers/video/chipsfb.c | |||
@@ -149,12 +149,11 @@ static int chipsfb_blank(int blank, struct fb_info *info) | |||
149 | mutex_lock(&pmac_backlight_mutex); | 149 | mutex_lock(&pmac_backlight_mutex); |
150 | 150 | ||
151 | if (pmac_backlight) { | 151 | if (pmac_backlight) { |
152 | down(&pmac_backlight->sem); | ||
153 | |||
154 | /* used to disable backlight only for blank > 1, but it seems | 152 | /* used to disable backlight only for blank > 1, but it seems |
155 | * useful at blank = 1 too (saves battery, extends backlight | 153 | * useful at blank = 1 too (saves battery, extends backlight |
156 | * life) | 154 | * life) |
157 | */ | 155 | */ |
156 | down(&pmac_backlight->sem); | ||
158 | if (blank) | 157 | if (blank) |
159 | pmac_backlight->props->power = FB_BLANK_POWERDOWN; | 158 | pmac_backlight->props->power = FB_BLANK_POWERDOWN; |
160 | else | 159 | else |