summaryrefslogtreecommitdiffstats
path: root/drivers/video/aty
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-02-10 15:04:08 +0000
committerRichard Purdie <rpurdie@rpsys.net>2007-02-20 09:26:40 +0000
commit321709c5994f952b78d567fd7083dbebbdc381b7 (patch)
treedf237c216e8bab6ce5c14d5797a796d4bf889a92 /drivers/video/aty
parente0e34ef7f02915cfe50e501e9f32c24217177a96 (diff)
downloadblackbird-op-linux-321709c5994f952b78d567fd7083dbebbdc381b7.tar.gz
blackbird-op-linux-321709c5994f952b78d567fd7083dbebbdc381b7.zip
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')
-rw-r--r--drivers/video/aty/aty128fb.c20
-rw-r--r--drivers/video/aty/atyfb_base.c20
-rw-r--r--drivers/video/aty/radeon_backlight.c13
3 files changed, 4 insertions, 49 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)
bd->props->power = FB_BLANK_UNBLANK;
backlight_update_status(bd);
-#ifdef CONFIG_PMAC_BACKLIGHT
- mutex_lock(&pmac_backlight_mutex);
- if (!pmac_backlight)
- pmac_backlight = bd;
- mutex_unlock(&pmac_backlight_mutex);
-#endif
-
printk("aty128: Backlight initialized (%s)\n", name);
return;
@@ -1846,17 +1839,8 @@ error:
static void aty128_bl_exit(struct backlight_device *bd)
{
- if (bd) {
-#ifdef CONFIG_PMAC_BACKLIGHT
- mutex_lock(&pmac_backlight_mutex);
- if (pmac_backlight == bd)
- pmac_backlight = NULL;
- mutex_unlock(&pmac_backlight_mutex);
-#endif
- backlight_device_unregister(bd);
-
- printk("aty128: Backlight unloaded\n");
- }
+ backlight_device_unregister(bd);
+ printk("aty128: Backlight unloaded\n");
}
#endif /* CONFIG_FB_ATY128_BACKLIGHT */
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)
bd->props->power = FB_BLANK_UNBLANK;
backlight_update_status(bd);
-#ifdef CONFIG_PMAC_BACKLIGHT
- mutex_lock(&pmac_backlight_mutex);
- if (!pmac_backlight)
- pmac_backlight = bd;
- mutex_unlock(&pmac_backlight_mutex);
-#endif
-
printk("aty: Backlight initialized (%s)\n", name);
return;
@@ -2215,17 +2208,8 @@ error:
static void aty_bl_exit(struct backlight_device *bd)
{
- if (bd) {
-#ifdef CONFIG_PMAC_BACKLIGHT
- mutex_lock(&pmac_backlight_mutex);
- if (pmac_backlight == bd)
- pmac_backlight = NULL;
- mutex_unlock(&pmac_backlight_mutex);
-#endif
- backlight_device_unregister(bd);
-
- printk("aty: Backlight unloaded\n");
- }
+ backlight_device_unregister(bd);
+ printk("aty: Backlight unloaded\n");
}
#endif /* CONFIG_FB_ATY_BACKLIGHT */
diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c
index f94e4616788d..8c775e6a7e03 100644
--- a/drivers/video/aty/radeon_backlight.c
+++ b/drivers/video/aty/radeon_backlight.c
@@ -192,13 +192,6 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
bd->props->power = FB_BLANK_UNBLANK;
backlight_update_status(bd);
-#ifdef CONFIG_PMAC_BACKLIGHT
- mutex_lock(&pmac_backlight_mutex);
- if (!pmac_backlight)
- pmac_backlight = bd;
- mutex_unlock(&pmac_backlight_mutex);
-#endif
-
printk("radeonfb: Backlight initialized (%s)\n", name);
return;
@@ -215,12 +208,6 @@ void radeonfb_bl_exit(struct radeonfb_info *rinfo)
if (bd) {
struct radeon_bl_privdata *pdata;
-#ifdef CONFIG_PMAC_BACKLIGHT
- mutex_lock(&pmac_backlight_mutex);
- if (pmac_backlight == bd)
- pmac_backlight = NULL;
- mutex_unlock(&pmac_backlight_mutex);
-#endif
pdata = class_get_devdata(&bd->class_dev);
backlight_device_unregister(bd);
kfree(pdata);
OpenPOWER on IntegriCloud