Skip to contentSkip to conversation

platform/x86: thinkpad_acpi: Fix a max_brightness of thinklight

PATCH In review Michał Szczepaniak 2 participants 2 messages Oct 8, 2022 – Nov 7, 2022 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: thinkpad_acpi: Fix a max_brightness of thinklight

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.

Also sorry for repeated messages, I got no reply so I'm trying to figure out what I did wrong.

---
 drivers/platform/x86/thinkpad_acpi.c | 1 +

 1 file changed, 1 insertion(+)
drivers/platform/x86/thinkpad_acpi.c +0 -0
index 22d4e8633e30e9..775c2f327dc3a8 100644
@@ -5562,6 +5562,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,
     }

#1 lore raw

Hi Michał,

Quoted 3 lines · Michał Szczepaniak

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.

Also sorry for repeated messages, I got no reply so I'm trying to figure out what I did wrong.

Your patch is missing a Signed-off-by line in the commit-message. I can only accept patches with a Signed-off-by line in the commit-message like this:

See:

https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin

Also your patch is malformed (it has been reflowed by your email client) and it does not apply properly.

Since this is only a trivial single line change I've just manually recreated the patch myself, with me as author to avoid the S-o-b problem.

I have given you credit by adding:

to the commit message of the patch.

Regards,

Hans

Quoted 22 lines

---
 drivers/platform/x86/thinkpad_acpi.c | 1 +

 1 file changed, 1 insertion(+)
drivers/platform/x86/thinkpad_acpi.c +1 -0
index 22d4e8633e30e9..775c2f327dc3a8 100644
@@ -5562,6 +5562,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,
      }