Skip to content

Commit

Permalink
platform/x86: thinkpad_acpi: Fix thinklight LED brightness returning 255
Browse files Browse the repository at this point in the history
[ Upstream commit eebf820 ]

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: db5e2a4 ("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>
  • Loading branch information
jwrdegoede authored and gregkh committed Feb 9, 2023
1 parent 21745fb commit e7cdec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/thinkpad_acpi.c
Expand Up @@ -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 = {
Expand Down

0 comments on commit e7cdec9

Please sign in to comment.