ppc32: Update PowerMac laptop backlight control core

parent 67d99eb9
...@@ -237,12 +237,6 @@ EXPORT_SYMBOL(adb_try_handler_change); ...@@ -237,12 +237,6 @@ EXPORT_SYMBOL(adb_try_handler_change);
EXPORT_SYMBOL(cuda_request); EXPORT_SYMBOL(cuda_request);
EXPORT_SYMBOL(cuda_poll); EXPORT_SYMBOL(cuda_poll);
#endif /* CONFIG_ADB_CUDA */ #endif /* CONFIG_ADB_CUDA */
#ifdef CONFIG_PMAC_BACKLIGHT
EXPORT_SYMBOL(get_backlight_level);
EXPORT_SYMBOL(set_backlight_level);
EXPORT_SYMBOL(set_backlight_enable);
EXPORT_SYMBOL(register_backlight_controller);
#endif /* CONFIG_PMAC_BACKLIGHT */
#ifdef CONFIG_PPC_MULTIPLATFORM #ifdef CONFIG_PPC_MULTIPLATFORM
EXPORT_SYMBOL(_machine); EXPORT_SYMBOL(_machine);
#endif #endif
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/nvram.h> #include <linux/nvram.h>
...@@ -37,6 +38,10 @@ register_backlight_controller(struct backlight_controller *ctrler, void *data, c ...@@ -37,6 +38,10 @@ register_backlight_controller(struct backlight_controller *ctrler, void *data, c
char *prop; char *prop;
int valid = 0; int valid = 0;
/* There's already a matching controller, bail out */
if (backlighter != NULL)
return;
bk_node = find_devices("backlight"); bk_node = find_devices("backlight");
#ifdef CONFIG_ADB_PMU #ifdef CONFIG_ADB_PMU
...@@ -84,6 +89,7 @@ register_backlight_controller(struct backlight_controller *ctrler, void *data, c ...@@ -84,6 +89,7 @@ register_backlight_controller(struct backlight_controller *ctrler, void *data, c
printk(KERN_INFO "Registered \"%s\" backlight controller, level: %d/15\n", printk(KERN_INFO "Registered \"%s\" backlight controller, level: %d/15\n",
type, backlight_level); type, backlight_level);
} }
EXPORT_SYMBOL(register_backlight_controller);
void __pmac void __pmac
unregister_backlight_controller(struct backlight_controller *ctrler, void *data) unregister_backlight_controller(struct backlight_controller *ctrler, void *data)
...@@ -92,6 +98,7 @@ unregister_backlight_controller(struct backlight_controller *ctrler, void *data) ...@@ -92,6 +98,7 @@ unregister_backlight_controller(struct backlight_controller *ctrler, void *data)
if (ctrler == backlighter && data == backlighter_data) if (ctrler == backlighter && data == backlighter_data)
backlighter = NULL; backlighter = NULL;
} }
EXPORT_SYMBOL(unregister_backlight_controller);
int __pmac int __pmac
set_backlight_enable(int enable) set_backlight_enable(int enable)
...@@ -105,6 +112,7 @@ set_backlight_enable(int enable) ...@@ -105,6 +112,7 @@ set_backlight_enable(int enable)
backlight_enabled = enable; backlight_enabled = enable;
return rc; return rc;
} }
EXPORT_SYMBOL(set_backlight_enable);
int __pmac int __pmac
get_backlight_enable(void) get_backlight_enable(void)
...@@ -113,6 +121,7 @@ get_backlight_enable(void) ...@@ -113,6 +121,7 @@ get_backlight_enable(void)
return -ENODEV; return -ENODEV;
return backlight_enabled; return backlight_enabled;
} }
EXPORT_SYMBOL(get_backlight_enable);
int __pmac int __pmac
set_backlight_level(int level) set_backlight_level(int level)
...@@ -137,6 +146,7 @@ set_backlight_level(int level) ...@@ -137,6 +146,7 @@ set_backlight_level(int level)
} }
return rc; return rc;
} }
EXPORT_SYMBOL(set_backlight_level);
int __pmac int __pmac
get_backlight_level(void) get_backlight_level(void)
...@@ -145,3 +155,4 @@ get_backlight_level(void) ...@@ -145,3 +155,4 @@ get_backlight_level(void)
return -ENODEV; return -ENODEV;
return backlight_level; return backlight_level;
} }
EXPORT_SYMBOL(get_backlight_level);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment