diff options
author | Michał Kępień <kernel@kempniu.pl> | 2017-02-17 02:57:51 -0500 |
---|---|---|
committer | Jacek Anaszewski <jacek.anaszewski@gmail.com> | 2017-03-06 16:07:07 -0500 |
commit | e5aa482a8add7673ae7260d704ef49749cd3af95 (patch) | |
tree | 0c283bfa628aabba23c6dbe44b5e7605b59b9013 | |
parent | 44319ab7e0ed13e550bc1714e32f037550c0d858 (diff) |
dell-led: remove code related to mic mute LED
With dell_micmute_led_set() moved to drivers/platform/x86/dell-laptop.c,
all remnants of the mic mute LED handling code can be removed from
drivers/leds/dell-led.c, restoring it back to the state it was in before
commit db6d8cc00773 ("dell-led: add mic mute led interface").
Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Tested-by: Alex Hung <alex.hung@canonical.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
-rw-r--r-- | drivers/leds/Kconfig | 1 | ||||
-rw-r--r-- | drivers/leds/dell-led.c | 25 |
2 files changed, 7 insertions, 19 deletions
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 275f467956ee..8d1b4c9b3bda 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig | |||
@@ -467,7 +467,6 @@ config LEDS_DELL_NETBOOKS | |||
467 | tristate "External LED on Dell Business Netbooks" | 467 | tristate "External LED on Dell Business Netbooks" |
468 | depends on LEDS_CLASS | 468 | depends on LEDS_CLASS |
469 | depends on X86 && ACPI_WMI | 469 | depends on X86 && ACPI_WMI |
470 | depends on DELL_SMBIOS | ||
471 | help | 470 | help |
472 | This adds support for the Latitude 2100 and similar | 471 | This adds support for the Latitude 2100 and similar |
473 | notebooks that have an external LED. | 472 | notebooks that have an external LED. |
diff --git a/drivers/leds/dell-led.c b/drivers/leds/dell-led.c index c9cc36a7c890..e5c57389efd6 100644 --- a/drivers/leds/dell-led.c +++ b/drivers/leds/dell-led.c | |||
@@ -15,15 +15,12 @@ | |||
15 | #include <linux/leds.h> | 15 | #include <linux/leds.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/dmi.h> | ||
19 | #include "../platform/x86/dell-smbios.h" | ||
20 | 18 | ||
21 | MODULE_AUTHOR("Louis Davis/Jim Dailey"); | 19 | MODULE_AUTHOR("Louis Davis/Jim Dailey"); |
22 | MODULE_DESCRIPTION("Dell LED Control Driver"); | 20 | MODULE_DESCRIPTION("Dell LED Control Driver"); |
23 | MODULE_LICENSE("GPL"); | 21 | MODULE_LICENSE("GPL"); |
24 | 22 | ||
25 | #define DELL_LED_BIOS_GUID "F6E4FE6E-909D-47cb-8BAB-C9F6F2F8D396" | 23 | #define DELL_LED_BIOS_GUID "F6E4FE6E-909D-47cb-8BAB-C9F6F2F8D396" |
26 | #define DELL_APP_GUID "A80593CE-A997-11DA-B012-B622A1EF5492" | ||
27 | MODULE_ALIAS("wmi:" DELL_LED_BIOS_GUID); | 24 | MODULE_ALIAS("wmi:" DELL_LED_BIOS_GUID); |
28 | 25 | ||
29 | /* Error Result Codes: */ | 26 | /* Error Result Codes: */ |
@@ -184,29 +181,21 @@ static int __init dell_led_init(void) | |||
184 | { | 181 | { |
185 | int error = 0; | 182 | int error = 0; |
186 | 183 | ||
187 | if (!wmi_has_guid(DELL_LED_BIOS_GUID) && !wmi_has_guid(DELL_APP_GUID)) | 184 | if (!wmi_has_guid(DELL_LED_BIOS_GUID)) |
188 | return -ENODEV; | 185 | return -ENODEV; |
189 | 186 | ||
190 | if (wmi_has_guid(DELL_LED_BIOS_GUID)) { | 187 | error = led_off(); |
191 | error = led_off(); | 188 | if (error != 0) |
192 | if (error != 0) | 189 | return -ENODEV; |
193 | return -ENODEV; | ||
194 | |||
195 | error = led_classdev_register(NULL, &dell_led); | ||
196 | } | ||
197 | 190 | ||
198 | return error; | 191 | return led_classdev_register(NULL, &dell_led); |
199 | } | 192 | } |
200 | 193 | ||
201 | static void __exit dell_led_exit(void) | 194 | static void __exit dell_led_exit(void) |
202 | { | 195 | { |
203 | int error = 0; | 196 | led_classdev_unregister(&dell_led); |
204 | 197 | ||
205 | if (wmi_has_guid(DELL_LED_BIOS_GUID)) { | 198 | led_off(); |
206 | error = led_off(); | ||
207 | if (error == 0) | ||
208 | led_classdev_unregister(&dell_led); | ||
209 | } | ||
210 | } | 199 | } |
211 | 200 | ||
212 | module_init(dell_led_init); | 201 | module_init(dell_led_init); |