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/nvidia/nvidia.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/nvidia/nvidia.c')
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index ef58c3825501..9f2066f0745a 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -932,16 +932,7 @@ static int nvidiafb_blank(int blank, struct fb_info *info) | |||
932 | NVWriteSeq(par, 0x01, tmp); | 932 | NVWriteSeq(par, 0x01, tmp); |
933 | NVWriteCrtc(par, 0x1a, vesa); | 933 | NVWriteCrtc(par, 0x1a, vesa); |
934 | 934 | ||
935 | #ifdef CONFIG_FB_NVIDIA_BACKLIGHT | 935 | nvidia_bl_set_power(info, blank); |
936 | mutex_lock(&info->bl_mutex); | ||
937 | if (info->bl_dev) { | ||
938 | down(&info->bl_dev->sem); | ||
939 | info->bl_dev->props->power = blank; | ||
940 | info->bl_dev->props->update_status(info->bl_dev); | ||
941 | up(&info->bl_dev->sem); | ||
942 | } | ||
943 | mutex_unlock(&info->bl_mutex); | ||
944 | #endif | ||
945 | 936 | ||
946 | NVTRACE_LEAVE(); | 937 | NVTRACE_LEAVE(); |
947 | 938 | ||