aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/backlight.h
diff options
context:
space:
mode:
authorMichael Hanselmann <linux-kernel@hansmi.ch>2006-07-10 07:44:45 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 16:24:20 -0400
commite01af0384f54023b4548b7742952da2ffcafd4cd (patch)
tree6ffd14821a0a1fedbf4430c5df7fa60822f4809f /include/asm-powerpc/backlight.h
parent58d383a6222d66be9483598c51bae34e7d3c2c37 (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 'include/asm-powerpc/backlight.h')
-rw-r--r--include/asm-powerpc/backlight.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/asm-powerpc/backlight.h b/include/asm-powerpc/backlight.h
index a5e9e656e332..58d4b6f8d827 100644
--- a/include/asm-powerpc/backlight.h
+++ b/include/asm-powerpc/backlight.h
@@ -16,13 +16,19 @@
16extern struct backlight_device *pmac_backlight; 16extern struct backlight_device *pmac_backlight;
17extern struct mutex pmac_backlight_mutex; 17extern struct mutex pmac_backlight_mutex;
18 18
19extern void pmac_backlight_calc_curve(struct fb_info*);
20extern int pmac_backlight_curve_lookup(struct fb_info *info, int value); 19extern int pmac_backlight_curve_lookup(struct fb_info *info, int value);
21 20
22extern int pmac_has_backlight_type(const char *type); 21extern int pmac_has_backlight_type(const char *type);
23 22
24extern void pmac_backlight_key_up(void); 23extern void pmac_backlight_key(int direction);
25extern void pmac_backlight_key_down(void); 24static inline void pmac_backlight_key_up(void)
25{
26 pmac_backlight_key(0);
27}
28static inline void pmac_backlight_key_down(void)
29{
30 pmac_backlight_key(1);
31}
26 32
27extern int pmac_backlight_set_legacy_brightness(int brightness); 33extern int pmac_backlight_set_legacy_brightness(int brightness);
28extern int pmac_backlight_get_legacy_brightness(void); 34extern int pmac_backlight_get_legacy_brightness(void);