summaryrefslogtreecommitdiffstats
path: root/drivers/video/nvidia
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/nvidia
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/nvidia')
-rw-r--r--drivers/video/nvidia/nv_backlight.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/drivers/video/nvidia/nv_backlight.c b/drivers/video/nvidia/nv_backlight.c
index 2bebfeeb4f1d..0e2bc519dcab 100644
--- a/drivers/video/nvidia/nv_backlight.c
+++ b/drivers/video/nvidia/nv_backlight.c
@@ -16,11 +16,6 @@
#include "nv_type.h"
#include "nv_proto.h"
-#ifdef CONFIG_PMAC_BACKLIGHT
-#include <asm/backlight.h>
-#include <asm/machdep.h>
-#endif
-
/* We do not have any information about which values are allowed, thus
* we used safe values.
*/
@@ -128,13 +123,6 @@ void nvidia_bl_init(struct nvidia_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("nvidia: Backlight initialized (%s)\n", name);
return;
@@ -148,15 +136,6 @@ void nvidia_bl_exit(struct nvidia_par *par)
struct fb_info *info = pci_get_drvdata(par->pci_dev);
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("nvidia: Backlight unloaded\n");
- }
+ backlight_device_unregister(bd);
+ printk("nvidia: Backlight unloaded\n");
}
OpenPOWER on IntegriCloud