aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2017-02-09 16:44:11 +0100
committerDarren Hart <dvhart@linux.intel.com>2017-02-24 23:48:51 -0800
commit06da5325d02ed3e9be9fbc7d0d621a04efc96961 (patch)
tree0084fa50385872a0510170481ead2c29534f5c87 /drivers/platform
parentleds: class: Add new optional brightness_hw_changed attribute (diff)
downloadlinux-dev-06da5325d02ed3e9be9fbc7d0d621a04efc96961.tar.xz
linux-dev-06da5325d02ed3e9be9fbc7d0d621a04efc96961.zip
platform/x86: thinkpad_acpi: Stop setting led_classdev brightness directly
There is no need to set the led_classdev's brightness value from its set_brightness callback, this is taken care of by the led-core and thinkpad_acpi really should not be mucking with it. Note that kbdlight_set_level_and_update() is still used by the old thinpad_acpi specific sysfs interface for the led, so we cannot remove it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index cacb43fb1df7..0680bb395204 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5095,8 +5095,6 @@ static int kbdlight_set_level(int level)
return 0;
}
-static int kbdlight_set_level_and_update(int level);
-
static int kbdlight_get_level(void)
{
int status = 0;
@@ -5164,7 +5162,7 @@ static void kbdlight_set_worker(struct work_struct *work)
container_of(work, struct tpacpi_led_classdev, work);
if (likely(tpacpi_lifecycle == TPACPI_LIFE_RUNNING))
- kbdlight_set_level_and_update(data->new_state);
+ kbdlight_set_level(data->new_state);
}
static void kbdlight_sysfs_set(struct led_classdev *led_cdev,