All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thinkpad_acpi: Fix inconsistent mute LED after resume
@ 2014-02-12 15:32 Takashi Iwai
  2014-02-12 19:21 ` Henrique de Moraes Holschuh
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Takashi Iwai @ 2014-02-12 15:32 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: Matthew Garrett, ibm-acpi-devel, platform-driver-x86,
	linux-kernel, David Henningsson

The mute LED states have to be restored after resume.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70351
Cc: <stable@vger.kernel.org> [v3.13+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 drivers/platform/x86/thinkpad_acpi.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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,
 };
 
 /****************************************************************************
-- 
1.8.5.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-02-14  6:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 15:32 [PATCH] thinkpad_acpi: Fix inconsistent mute LED after resume Takashi Iwai
2014-02-12 19:21 ` Henrique de Moraes Holschuh
2014-02-12 20:36 ` Matthew Garrett
2014-02-12 20:36   ` Matthew Garrett
2014-02-12 20:37 ` Matthew Garrett
2014-02-12 20:37   ` Matthew Garrett
2014-02-13  8:35   ` Takashi Iwai
2014-02-13  8:35     ` Takashi Iwai
2014-02-13 18:02     ` rauchwolke
2014-02-13 18:02       ` rauchwolke
2014-02-14  6:37       ` Takashi Iwai
2014-02-14  6:37         ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.