diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-02-10 10:04:08 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-02-20 04:26:40 -0500 |
commit | 321709c5994f952b78d567fd7083dbebbdc381b7 (patch) | |
tree | df237c216e8bab6ce5c14d5797a796d4bf889a92 /drivers/video/aty/aty128fb.c | |
parent | e0e34ef7f02915cfe50e501e9f32c24217177a96 (diff) |
backlight: Clean up pmac_backlight handling
Move the setting/unsetting of pmac_backlight into the
backlight core instead of doing it in each driver.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'drivers/video/aty/aty128fb.c')
-rw-r--r-- | drivers/video/aty/aty128fb.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index ef3e7861c27a..4de8d6252c3c 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -1829,13 +1829,6 @@ static void aty128_bl_init(struct aty128fb_par *par) | |||
1829 | bd->props->power = FB_BLANK_UNBLANK; | 1829 | bd->props->power = FB_BLANK_UNBLANK; |
1830 | backlight_update_status(bd); | 1830 | backlight_update_status(bd); |
1831 | 1831 | ||
1832 | #ifdef CONFIG_PMAC_BACKLIGHT | ||
1833 | mutex_lock(&pmac_backlight_mutex); | ||
1834 | if (!pmac_backlight) | ||
1835 | pmac_backlight = bd; | ||
1836 | mutex_unlock(&pmac_backlight_mutex); | ||
1837 | #endif | ||
1838 | |||
1839 | printk("aty128: Backlight initialized (%s)\n", name); | 1832 | printk("aty128: Backlight initialized (%s)\n", name); |
1840 | 1833 | ||
1841 | return; | 1834 | return; |
@@ -1846,17 +1839,8 @@ error: | |||
1846 | 1839 | ||
1847 | static void aty128_bl_exit(struct backlight_device *bd) | 1840 | static void aty128_bl_exit(struct backlight_device *bd) |
1848 | { | 1841 | { |
1849 | if (bd) { | 1842 | backlight_device_unregister(bd); |
1850 | #ifdef CONFIG_PMAC_BACKLIGHT | 1843 | printk("aty128: Backlight unloaded\n"); |
1851 | mutex_lock(&pmac_backlight_mutex); | ||
1852 | if (pmac_backlight == bd) | ||
1853 | pmac_backlight = NULL; | ||
1854 | mutex_unlock(&pmac_backlight_mutex); | ||
1855 | #endif | ||
1856 | backlight_device_unregister(bd); | ||
1857 | |||
1858 | printk("aty128: Backlight unloaded\n"); | ||
1859 | } | ||
1860 | } | 1844 | } |
1861 | #endif /* CONFIG_FB_ATY128_BACKLIGHT */ | 1845 | #endif /* CONFIG_FB_ATY128_BACKLIGHT */ |
1862 | 1846 | ||