aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty/aty128fb.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-09-04 10:31:36 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-09-04 10:31:36 -0400
commit31e77ac55f18db0ec1c724840927562ef3093ef6 (patch)
tree01bb0ac2868debd2246df4c5e5617a2ce9f09600 /drivers/video/aty/aty128fb.c
parent5029996547a9f3988459e11955c13259495308ef (diff)
parentc336923b668fdcf0312efbec3b44895d713f4d81 (diff)
Merge branch 'master' into gfs2
Diffstat (limited to 'drivers/video/aty/aty128fb.c')
-rw-r--r--drivers/video/aty/aty128fb.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index 3e827e04a2aa..276a21530b95 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -1801,10 +1801,14 @@ static struct backlight_properties aty128_bl_data = {
1801static void aty128_bl_set_power(struct fb_info *info, int power) 1801static void aty128_bl_set_power(struct fb_info *info, int power)
1802{ 1802{
1803 mutex_lock(&info->bl_mutex); 1803 mutex_lock(&info->bl_mutex);
1804 up(&info->bl_dev->sem); 1804
1805 info->bl_dev->props->power = power; 1805 if (info->bl_dev) {
1806 __aty128_bl_update_status(info->bl_dev); 1806 down(&info->bl_dev->sem);
1807 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
1808 mutex_unlock(&info->bl_mutex); 1812 mutex_unlock(&info->bl_mutex);
1809} 1813}
1810 1814
@@ -1828,7 +1832,7 @@ static void aty128_bl_init(struct aty128fb_par *par)
1828 bd = backlight_device_register(name, par, &aty128_bl_data); 1832 bd = backlight_device_register(name, par, &aty128_bl_data);
1829 if (IS_ERR(bd)) { 1833 if (IS_ERR(bd)) {
1830 info->bl_dev = NULL; 1834 info->bl_dev = NULL;
1831 printk("aty128: Backlight registration failed\n"); 1835 printk(KERN_WARNING "aty128: Backlight registration failed\n");
1832 goto error; 1836 goto error;
1833 } 1837 }
1834 1838
@@ -1839,11 +1843,11 @@ static void aty128_bl_init(struct aty128fb_par *par)
1839 219 * FB_BACKLIGHT_MAX / MAX_LEVEL); 1843 219 * FB_BACKLIGHT_MAX / MAX_LEVEL);
1840 mutex_unlock(&info->bl_mutex); 1844 mutex_unlock(&info->bl_mutex);
1841 1845
1842 up(&bd->sem); 1846 down(&bd->sem);
1843 bd->props->brightness = aty128_bl_data.max_brightness; 1847 bd->props->brightness = aty128_bl_data.max_brightness;
1844 bd->props->power = FB_BLANK_UNBLANK; 1848 bd->props->power = FB_BLANK_UNBLANK;
1845 bd->props->update_status(bd); 1849 bd->props->update_status(bd);
1846 down(&bd->sem); 1850 up(&bd->sem);
1847 1851
1848#ifdef CONFIG_PMAC_BACKLIGHT 1852#ifdef CONFIG_PMAC_BACKLIGHT
1849 mutex_lock(&pmac_backlight_mutex); 1853 mutex_lock(&pmac_backlight_mutex);