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/atyfb_base.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/atyfb_base.c')
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 66462286e704..35ba26567598 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -2198,13 +2198,6 @@ static void aty_bl_init(struct atyfb_par *par) | |||
2198 | bd->props->power = FB_BLANK_UNBLANK; | 2198 | bd->props->power = FB_BLANK_UNBLANK; |
2199 | backlight_update_status(bd); | 2199 | backlight_update_status(bd); |
2200 | 2200 | ||
2201 | #ifdef CONFIG_PMAC_BACKLIGHT | ||
2202 | mutex_lock(&pmac_backlight_mutex); | ||
2203 | if (!pmac_backlight) | ||
2204 | pmac_backlight = bd; | ||
2205 | mutex_unlock(&pmac_backlight_mutex); | ||
2206 | #endif | ||
2207 | |||
2208 | printk("aty: Backlight initialized (%s)\n", name); | 2201 | printk("aty: Backlight initialized (%s)\n", name); |
2209 | 2202 | ||
2210 | return; | 2203 | return; |
@@ -2215,17 +2208,8 @@ error: | |||
2215 | 2208 | ||
2216 | static void aty_bl_exit(struct backlight_device *bd) | 2209 | static void aty_bl_exit(struct backlight_device *bd) |
2217 | { | 2210 | { |
2218 | if (bd) { | 2211 | backlight_device_unregister(bd); |
2219 | #ifdef CONFIG_PMAC_BACKLIGHT | 2212 | printk("aty: Backlight unloaded\n"); |
2220 | mutex_lock(&pmac_backlight_mutex); | ||
2221 | if (pmac_backlight == bd) | ||
2222 | pmac_backlight = NULL; | ||
2223 | mutex_unlock(&pmac_backlight_mutex); | ||
2224 | #endif | ||
2225 | backlight_device_unregister(bd); | ||
2226 | |||
2227 | printk("aty: Backlight unloaded\n"); | ||
2228 | } | ||
2229 | } | 2213 | } |
2230 | 2214 | ||
2231 | #endif /* CONFIG_FB_ATY_BACKLIGHT */ | 2215 | #endif /* CONFIG_FB_ATY_BACKLIGHT */ |