summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/thinkpad_acpi.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-01-28 00:57:23 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-09 11:28:07 +0100
commite7cdec97ebebf70c4574edef8343ac22e02b03a6 (patch)
tree6e897c69e281b61b9b08e81bc3358692c10781c1 /drivers/platform/x86/thinkpad_acpi.c
parent21745fbfe7600881ddcefe270d4659f56ac54133 (diff)
downloadlinux-stable-e7cdec97ebebf70c4574edef8343ac22e02b03a6.tar.gz
linux-stable-e7cdec97ebebf70c4574edef8343ac22e02b03a6.tar.bz2
linux-stable-e7cdec97ebebf70c4574edef8343ac22e02b03a6.zip
platform/x86: thinkpad_acpi: Fix thinklight LED brightness returning 255
[ Upstream commit eebf82012dddbdcb09e4e49d3cdfafb93bc66eb2 ] Reading the thinklight LED brightnes while the LED is on returns 255 (LED_FULL) but we advertise a max_brightness of 1, so this should be 1 (LED_ON). Fixes: db5e2a4ca0a7 ("platform/x86: thinkpad_acpi: Fix max_brightness of thinklight") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230127235723.412864-1-hdegoede@redhat.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/platform/x86/thinkpad_acpi.c')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 7fd735c67a8e..2a48a2d880d8 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5566,7 +5566,7 @@ static int light_sysfs_set(struct led_classdev *led_cdev,
static enum led_brightness light_sysfs_get(struct led_classdev *led_cdev)
{
- return (light_get_status() == 1) ? LED_FULL : LED_OFF;
+ return (light_get_status() == 1) ? LED_ON : LED_OFF;
}
static struct tpacpi_led_classdev tpacpi_led_thinklight = {