thinkpad_acpi: Fix inconsistent mute LED after resume
authorTakashi Iwai <tiwai@suse.de>
Wed, 12 Feb 2014 15:32:45 +0000 (16:32 +0100)
committerMatthew Garrett <matthew.garrett@nebula.com>
Sun, 6 Apr 2014 16:58:13 +0000 (12:58 -0400)
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>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/thinkpad_acpi.c

index 94bb6157c957b495a955159ea4916769f373862f..dcc833a0b2fd182600fb1824213e7f1919ce213d 100644 (file)
@@ -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,
 };
 
 /****************************************************************************