From 321709c5994f952b78d567fd7083dbebbdc381b7 Mon Sep 17 00:00:00 2001 From: Richard Purdie <rpurdie@rpsys.net> Date: Sat, 10 Feb 2007 15:04:08 +0000 Subject: 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> --- drivers/video/riva/fbdev.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'drivers/video/riva') diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index ab00350907dd..3a75def01b28 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c @@ -371,13 +371,6 @@ static void riva_bl_init(struct riva_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("riva: Backlight initialized (%s)\n", name); return; @@ -390,17 +383,8 @@ static void riva_bl_exit(struct fb_info *info) { struct backlight_device *bd = info->bl_dev; - 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("riva: Backlight unloaded\n"); - } + backlight_device_unregister(bd); + printk("riva: Backlight unloaded\n"); } #else static inline void riva_bl_init(struct riva_par *par) {} -- cgit v1.2.3