diff options
Diffstat (limited to 'drivers/video/aty/aty128fb.c')
-rw-r--r-- | drivers/video/aty/aty128fb.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 106d428b72c9..276a21530b95 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -1800,14 +1800,15 @@ static struct backlight_properties aty128_bl_data = { | |||
1800 | 1800 | ||
1801 | static void aty128_bl_set_power(struct fb_info *info, int power) | 1801 | static void aty128_bl_set_power(struct fb_info *info, int power) |
1802 | { | 1802 | { |
1803 | if (info->bl_dev == NULL) | ||
1804 | return; | ||
1805 | |||
1806 | mutex_lock(&info->bl_mutex); | 1803 | mutex_lock(&info->bl_mutex); |
1807 | up(&info->bl_dev->sem); | 1804 | |
1808 | info->bl_dev->props->power = power; | 1805 | if (info->bl_dev) { |
1809 | __aty128_bl_update_status(info->bl_dev); | 1806 | down(&info->bl_dev->sem); |
1810 | down(&info->bl_dev->sem); | 1807 | info->bl_dev->props->power = power; |
1808 | __aty128_bl_update_status(info->bl_dev); | ||
1809 | up(&info->bl_dev->sem); | ||
1810 | } | ||
1811 | |||
1811 | mutex_unlock(&info->bl_mutex); | 1812 | mutex_unlock(&info->bl_mutex); |
1812 | } | 1813 | } |
1813 | 1814 | ||
@@ -1842,11 +1843,11 @@ static void aty128_bl_init(struct aty128fb_par *par) | |||
1842 | 219 * FB_BACKLIGHT_MAX / MAX_LEVEL); | 1843 | 219 * FB_BACKLIGHT_MAX / MAX_LEVEL); |
1843 | mutex_unlock(&info->bl_mutex); | 1844 | mutex_unlock(&info->bl_mutex); |
1844 | 1845 | ||
1845 | up(&bd->sem); | 1846 | down(&bd->sem); |
1846 | bd->props->brightness = aty128_bl_data.max_brightness; | 1847 | bd->props->brightness = aty128_bl_data.max_brightness; |
1847 | bd->props->power = FB_BLANK_UNBLANK; | 1848 | bd->props->power = FB_BLANK_UNBLANK; |
1848 | bd->props->update_status(bd); | 1849 | bd->props->update_status(bd); |
1849 | down(&bd->sem); | 1850 | up(&bd->sem); |
1850 | 1851 | ||
1851 | #ifdef CONFIG_PMAC_BACKLIGHT | 1852 | #ifdef CONFIG_PMAC_BACKLIGHT |
1852 | mutex_lock(&pmac_backlight_mutex); | 1853 | mutex_lock(&pmac_backlight_mutex); |