diff options
author | Stephen Gildea <stepheng+linux@gildea.com> | 2009-08-25 01:11:52 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-08-28 15:17:08 -0400 |
commit | 1e384cb0f9a940f2a431d1708f963987e61d71e3 (patch) | |
tree | 632b4bd73a7abe0cef85f440e2af11eded131110 /drivers/platform | |
parent | c1b5310a957c47d1c66bb53035c6ba6aa20a150f (diff) |
fujitsu-laptop: support led-class as module
Support fujitsu-laptop with led-class built as a module instead of
being compiled in.
Signed-off-by: Stephen Gildea <stepheng+linux@gildea.com>
Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/fujitsu-laptop.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 218b9a16ac3f..4c8897a84c68 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c | |||
@@ -66,7 +66,7 @@ | |||
66 | #include <linux/kfifo.h> | 66 | #include <linux/kfifo.h> |
67 | #include <linux/video_output.h> | 67 | #include <linux/video_output.h> |
68 | #include <linux/platform_device.h> | 68 | #include <linux/platform_device.h> |
69 | #ifdef CONFIG_LEDS_CLASS | 69 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) |
70 | #include <linux/leds.h> | 70 | #include <linux/leds.h> |
71 | #endif | 71 | #endif |
72 | 72 | ||
@@ -96,7 +96,7 @@ | |||
96 | /* FUNC interface - responses */ | 96 | /* FUNC interface - responses */ |
97 | #define UNSUPPORTED_CMD 0x80000000 | 97 | #define UNSUPPORTED_CMD 0x80000000 |
98 | 98 | ||
99 | #ifdef CONFIG_LEDS_CLASS | 99 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) |
100 | /* FUNC interface - LED control */ | 100 | /* FUNC interface - LED control */ |
101 | #define FUNC_LED_OFF 0x1 | 101 | #define FUNC_LED_OFF 0x1 |
102 | #define FUNC_LED_ON 0x30001 | 102 | #define FUNC_LED_ON 0x30001 |
@@ -176,7 +176,7 @@ static struct fujitsu_hotkey_t *fujitsu_hotkey; | |||
176 | 176 | ||
177 | static void acpi_fujitsu_hotkey_notify(struct acpi_device *device, u32 event); | 177 | static void acpi_fujitsu_hotkey_notify(struct acpi_device *device, u32 event); |
178 | 178 | ||
179 | #ifdef CONFIG_LEDS_CLASS | 179 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) |
180 | static enum led_brightness logolamp_get(struct led_classdev *cdev); | 180 | static enum led_brightness logolamp_get(struct led_classdev *cdev); |
181 | static void logolamp_set(struct led_classdev *cdev, | 181 | static void logolamp_set(struct led_classdev *cdev, |
182 | enum led_brightness brightness); | 182 | enum led_brightness brightness); |
@@ -257,7 +257,7 @@ static int call_fext_func(int cmd, int arg0, int arg1, int arg2) | |||
257 | return out_obj.integer.value; | 257 | return out_obj.integer.value; |
258 | } | 258 | } |
259 | 259 | ||
260 | #ifdef CONFIG_LEDS_CLASS | 260 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) |
261 | /* LED class callbacks */ | 261 | /* LED class callbacks */ |
262 | 262 | ||
263 | static void logolamp_set(struct led_classdev *cdev, | 263 | static void logolamp_set(struct led_classdev *cdev, |
@@ -911,7 +911,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device) | |||
911 | printk(KERN_INFO "fujitsu-laptop: BTNI: [0x%x]\n", | 911 | printk(KERN_INFO "fujitsu-laptop: BTNI: [0x%x]\n", |
912 | call_fext_func(FUNC_BUTTONS, 0x0, 0x0, 0x0)); | 912 | call_fext_func(FUNC_BUTTONS, 0x0, 0x0, 0x0)); |
913 | 913 | ||
914 | #ifdef CONFIG_LEDS_CLASS | 914 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) |
915 | if (call_fext_func(FUNC_LEDS, 0x0, 0x0, 0x0) & LOGOLAMP_POWERON) { | 915 | if (call_fext_func(FUNC_LEDS, 0x0, 0x0, 0x0) & LOGOLAMP_POWERON) { |
916 | result = led_classdev_register(&fujitsu->pf_device->dev, | 916 | result = led_classdev_register(&fujitsu->pf_device->dev, |
917 | &logolamp_led); | 917 | &logolamp_led); |
@@ -1204,7 +1204,7 @@ fail_acpi: | |||
1204 | 1204 | ||
1205 | static void __exit fujitsu_cleanup(void) | 1205 | static void __exit fujitsu_cleanup(void) |
1206 | { | 1206 | { |
1207 | #ifdef CONFIG_LEDS_CLASS | 1207 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) |
1208 | if (fujitsu_hotkey->logolamp_registered != 0) | 1208 | if (fujitsu_hotkey->logolamp_registered != 0) |
1209 | led_classdev_unregister(&logolamp_led); | 1209 | led_classdev_unregister(&logolamp_led); |
1210 | 1210 | ||