diff options
author | Paul Mackerras <paulus@samba.org> | 2006-09-13 17:07:18 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-09-13 17:07:18 -0400 |
commit | c547fc28ab3e8716076fdaf4bd0260c5d63a18f7 (patch) | |
tree | 34af1fa64a63618660187ae58ad182665a1861ef /drivers/video/nvidia | |
parent | 3dd836a56de0d4f049438412959b905e1db4666e (diff) | |
parent | 63b98080daa35f0d682db04f4fb7ada010888752 (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/video/nvidia')
-rw-r--r-- | drivers/video/nvidia/nv_backlight.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/video/nvidia/nv_backlight.c b/drivers/video/nvidia/nv_backlight.c index 14c37c42191c..5b75ae4e9457 100644 --- a/drivers/video/nvidia/nv_backlight.c +++ b/drivers/video/nvidia/nv_backlight.c | |||
@@ -112,13 +112,15 @@ static struct backlight_properties nvidia_bl_data = { | |||
112 | 112 | ||
113 | void nvidia_bl_set_power(struct fb_info *info, int power) | 113 | void nvidia_bl_set_power(struct fb_info *info, int power) |
114 | { | 114 | { |
115 | if (info->bl_dev == NULL) | ||
116 | return; | ||
117 | mutex_lock(&info->bl_mutex); | 115 | mutex_lock(&info->bl_mutex); |
118 | up(&info->bl_dev->sem); | 116 | |
119 | info->bl_dev->props->power = power; | 117 | if (info->bl_dev) { |
120 | __nvidia_bl_update_status(info->bl_dev); | 118 | down(&info->bl_dev->sem); |
121 | down(&info->bl_dev->sem); | 119 | info->bl_dev->props->power = power; |
120 | __nvidia_bl_update_status(info->bl_dev); | ||
121 | up(&info->bl_dev->sem); | ||
122 | } | ||
123 | |||
122 | mutex_unlock(&info->bl_mutex); | 124 | mutex_unlock(&info->bl_mutex); |
123 | } | 125 | } |
124 | 126 | ||
@@ -153,11 +155,11 @@ void nvidia_bl_init(struct nvidia_par *par) | |||
153 | 0x534 * FB_BACKLIGHT_MAX / MAX_LEVEL); | 155 | 0x534 * FB_BACKLIGHT_MAX / MAX_LEVEL); |
154 | mutex_unlock(&info->bl_mutex); | 156 | mutex_unlock(&info->bl_mutex); |
155 | 157 | ||
156 | up(&bd->sem); | 158 | down(&bd->sem); |
157 | bd->props->brightness = nvidia_bl_data.max_brightness; | 159 | bd->props->brightness = nvidia_bl_data.max_brightness; |
158 | bd->props->power = FB_BLANK_UNBLANK; | 160 | bd->props->power = FB_BLANK_UNBLANK; |
159 | bd->props->update_status(bd); | 161 | bd->props->update_status(bd); |
160 | down(&bd->sem); | 162 | up(&bd->sem); |
161 | 163 | ||
162 | #ifdef CONFIG_PMAC_BACKLIGHT | 164 | #ifdef CONFIG_PMAC_BACKLIGHT |
163 | mutex_lock(&pmac_backlight_mutex); | 165 | mutex_lock(&pmac_backlight_mutex); |