diff options
Diffstat (limited to 'drivers/video/aty')
-rw-r--r-- | drivers/video/aty/aty128fb.c | 18 | ||||
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 18 | ||||
-rw-r--r-- | drivers/video/aty/radeon_backlight.c | 4 |
3 files changed, 24 insertions, 16 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 = { | |||
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 | 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); |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 053ff63365b7..19a71f045784 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -2200,10 +2200,14 @@ static struct backlight_properties aty_bl_data = { | |||
2200 | static void aty_bl_set_power(struct fb_info *info, int power) | 2200 | static void aty_bl_set_power(struct fb_info *info, int power) |
2201 | { | 2201 | { |
2202 | mutex_lock(&info->bl_mutex); | 2202 | mutex_lock(&info->bl_mutex); |
2203 | up(&info->bl_dev->sem); | 2203 | |
2204 | info->bl_dev->props->power = power; | 2204 | if (info->bl_dev) { |
2205 | __aty_bl_update_status(info->bl_dev); | 2205 | down(&info->bl_dev->sem); |
2206 | down(&info->bl_dev->sem); | 2206 | info->bl_dev->props->power = power; |
2207 | __aty_bl_update_status(info->bl_dev); | ||
2208 | up(&info->bl_dev->sem); | ||
2209 | } | ||
2210 | |||
2207 | mutex_unlock(&info->bl_mutex); | 2211 | mutex_unlock(&info->bl_mutex); |
2208 | } | 2212 | } |
2209 | 2213 | ||
@@ -2223,7 +2227,7 @@ static void aty_bl_init(struct atyfb_par *par) | |||
2223 | bd = backlight_device_register(name, par, &aty_bl_data); | 2227 | bd = backlight_device_register(name, par, &aty_bl_data); |
2224 | if (IS_ERR(bd)) { | 2228 | if (IS_ERR(bd)) { |
2225 | info->bl_dev = NULL; | 2229 | info->bl_dev = NULL; |
2226 | printk("aty: Backlight registration failed\n"); | 2230 | printk(KERN_WARNING "aty: Backlight registration failed\n"); |
2227 | goto error; | 2231 | goto error; |
2228 | } | 2232 | } |
2229 | 2233 | ||
@@ -2234,11 +2238,11 @@ static void aty_bl_init(struct atyfb_par *par) | |||
2234 | 0xFF * FB_BACKLIGHT_MAX / MAX_LEVEL); | 2238 | 0xFF * FB_BACKLIGHT_MAX / MAX_LEVEL); |
2235 | mutex_unlock(&info->bl_mutex); | 2239 | mutex_unlock(&info->bl_mutex); |
2236 | 2240 | ||
2237 | up(&bd->sem); | 2241 | down(&bd->sem); |
2238 | bd->props->brightness = aty_bl_data.max_brightness; | 2242 | bd->props->brightness = aty_bl_data.max_brightness; |
2239 | bd->props->power = FB_BLANK_UNBLANK; | 2243 | bd->props->power = FB_BLANK_UNBLANK; |
2240 | bd->props->update_status(bd); | 2244 | bd->props->update_status(bd); |
2241 | down(&bd->sem); | 2245 | up(&bd->sem); |
2242 | 2246 | ||
2243 | #ifdef CONFIG_PMAC_BACKLIGHT | 2247 | #ifdef CONFIG_PMAC_BACKLIGHT |
2244 | mutex_lock(&pmac_backlight_mutex); | 2248 | mutex_lock(&pmac_backlight_mutex); |
diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c index 1755dddf1899..585eb7b9e636 100644 --- a/drivers/video/aty/radeon_backlight.c +++ b/drivers/video/aty/radeon_backlight.c | |||
@@ -195,11 +195,11 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo) | |||
195 | 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL); | 195 | 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL); |
196 | mutex_unlock(&rinfo->info->bl_mutex); | 196 | mutex_unlock(&rinfo->info->bl_mutex); |
197 | 197 | ||
198 | up(&bd->sem); | 198 | down(&bd->sem); |
199 | bd->props->brightness = radeon_bl_data.max_brightness; | 199 | bd->props->brightness = radeon_bl_data.max_brightness; |
200 | bd->props->power = FB_BLANK_UNBLANK; | 200 | bd->props->power = FB_BLANK_UNBLANK; |
201 | bd->props->update_status(bd); | 201 | bd->props->update_status(bd); |
202 | down(&bd->sem); | 202 | up(&bd->sem); |
203 | 203 | ||
204 | #ifdef CONFIG_PMAC_BACKLIGHT | 204 | #ifdef CONFIG_PMAC_BACKLIGHT |
205 | mutex_lock(&pmac_backlight_mutex); | 205 | mutex_lock(&pmac_backlight_mutex); |