summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-12 16:32:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-13 13:32:56 +0200
commit8df2d9dd26fce11a557dd4b772bb87982c66f59a (patch)
tree9c20de737c26267b774a4c944722837008769435 /drivers/platform
parent871262107293e31c4d9ef5265c93eb9072d51e7a (diff)
thinkpad_acpi: Fix inconsistent mute LED after resume
commit 119f449866ad18785b0445adaf0d2859c6dbdaa3 upstream. The mute LED states have to be restored after resume. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70351 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index defb6afc1409..e2a91c845ac9 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -8447,9 +8447,21 @@ static void mute_led_exit(void)
tpacpi_led_set(i, false);
}
+static void mute_led_resume(void)
+{
+ int i;
+
+ for (i = 0; i < TPACPI_LED_MAX; i++) {
+ struct tp_led_table *t = &led_tables[i];
+ if (t->state >= 0)
+ mute_led_on_off(t, t->state);
+ }
+}
+
static struct ibm_struct mute_led_driver_data = {
.name = "mute_led",
.exit = mute_led_exit,
+ .resume = mute_led_resume,
};
/****************************************************************************