Patch "platform/x86: thinkpad_acpi: Fix max_brightness of thinklight" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    platform/x86: thinkpad_acpi: Fix max_brightness of thinklight

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     platform-x86-thinkpad_acpi-fix-max_brightness-of-thi.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fa058b0e9ff23bd4930c2545facd3a534e22597b
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Mon Nov 7 13:43:22 2022 +0100

    platform/x86: thinkpad_acpi: Fix max_brightness of thinklight
    
    [ Upstream commit db5e2a4ca0a7a5fe54f410590292ea2e91de6798 ]
    
    Thinklight has only two values, on/off so it's reasonable for
    max_brightness to be 0 and 1 as if you write anything between 0 and 255
    it will be 255 anyway so there's no point for it to be 255.
    
    This may look like it is a userspace API change, but writes with
    a value larget then the new max_brightness will still be accepted,
    these will be silently clamped to the new max_brightness by
    led_set_brightness_nosleep(). So no userspace API problems are
    expected.
    
    Reported-by: Michał Szczepaniak <m.szczepaniak.000@xxxxxxxxx>
    Link: https://lore.kernel.org/platform-driver-x86/55400326-e64f-5444-94e5-22b8214d00b6@xxxxxxxxx/
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 8476dfef4e62..a1d91736a03b 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5572,6 +5572,7 @@ static enum led_brightness light_sysfs_get(struct led_classdev *led_cdev)
 static struct tpacpi_led_classdev tpacpi_led_thinklight = {
 	.led_classdev = {
 		.name		= "tpacpi::thinklight",
+		.max_brightness	= 1,
 		.brightness_set_blocking = &light_sysfs_set,
 		.brightness_get	= &light_sysfs_get,
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux