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/nvidia/nv_backlight.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/nvidia/nv_backlight.c')
-rw-r--r-- | drivers/video/nvidia/nv_backlight.c | 25 |
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 @@ | |||
16 | #include "nv_type.h" | 16 | #include "nv_type.h" |
17 | #include "nv_proto.h" | 17 | #include "nv_proto.h" |
18 | 18 | ||
19 | #ifdef CONFIG_PMAC_BACKLIGHT | ||
20 | #include <asm/backlight.h> | ||
21 | #include <asm/machdep.h> | ||
22 | #endif | ||
23 | |||
24 | /* We do not have any information about which values are allowed, thus | 19 | /* We do not have any information about which values are allowed, thus |
25 | * we used safe values. | 20 | * we used safe values. |
26 | */ | 21 | */ |
@@ -128,13 +123,6 @@ void nvidia_bl_init(struct nvidia_par *par) | |||
128 | bd->props->power = FB_BLANK_UNBLANK; | 123 | bd->props->power = FB_BLANK_UNBLANK; |
129 | backlight_update_status(bd); | 124 | backlight_update_status(bd); |
130 | 125 | ||
131 | #ifdef CONFIG_PMAC_BACKLIGHT | ||
132 | mutex_lock(&pmac_backlight_mutex); | ||
133 | if (!pmac_backlight) | ||
134 | pmac_backlight = bd; | ||
135 | mutex_unlock(&pmac_backlight_mutex); | ||
136 | #endif | ||
137 | |||
138 | printk("nvidia: Backlight initialized (%s)\n", name); | 126 | printk("nvidia: Backlight initialized (%s)\n", name); |
139 | 127 | ||
140 | return; | 128 | return; |
@@ -148,15 +136,6 @@ void nvidia_bl_exit(struct nvidia_par *par) | |||
148 | struct fb_info *info = pci_get_drvdata(par->pci_dev); | 136 | struct fb_info *info = pci_get_drvdata(par->pci_dev); |
149 | struct backlight_device *bd = info->bl_dev; | 137 | struct backlight_device *bd = info->bl_dev; |
150 | 138 | ||
151 | if (bd) { | 139 | backlight_device_unregister(bd); |
152 | #ifdef CONFIG_PMAC_BACKLIGHT | 140 | printk("nvidia: Backlight unloaded\n"); |
153 | mutex_lock(&pmac_backlight_mutex); | ||
154 | if (pmac_backlight == bd) | ||
155 | pmac_backlight = NULL; | ||
156 | mutex_unlock(&pmac_backlight_mutex); | ||
157 | #endif | ||
158 | backlight_device_unregister(bd); | ||
159 | |||
160 | printk("nvidia: Backlight unloaded\n"); | ||
161 | } | ||
162 | } | 141 | } |