diff options
author | 2021-11-23 22:05:23 +0100 | |
---|---|---|
committer | 2021-12-02 12:58:25 +0100 | |
commit | e518704d634fe3205903da6cbe97debf34885812 (patch) | |
tree | cb8eb57df4e62b93442206359cfe622a9be54118 | |
parent | platform/x86: thinkpad_acpi: Remove unused sensors_pdev_attrs_registered flag (diff) | |
download | wireguard-linux-e518704d634fe3205903da6cbe97debf34885812.tar.xz wireguard-linux-e518704d634fe3205903da6cbe97debf34885812.zip |
platform/x86: thinkpad_acpi: Add LED_RETAIN_AT_SHUTDOWN to led_class_devs
Add the LED_RETAIN_AT_SHUTDOWN flag to the registered led_class_devs so
that the LEDs do not get turned-off when reloading the driver and thus so
that they also stay under default EC control when reloading the driver,
unless explicitly overridden by the user.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211123210524.266705-1-hdegoede@redhat.com
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index c198acc6f53b..07db6d5f1f90 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -5809,6 +5809,7 @@ static int __init tpacpi_init_led(unsigned int led) tpacpi_leds[led].led_classdev.brightness_get = &led_sysfs_get; tpacpi_leds[led].led_classdev.name = tpacpi_led_names[led]; + tpacpi_leds[led].led_classdev.flags = LED_RETAIN_AT_SHUTDOWN; tpacpi_leds[led].led = led; return led_classdev_register(&tpacpi_pdev->dev, &tpacpi_leds[led].led_classdev); |