From patchwork Fri May 2 15:38:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 345045 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 1E58E140134; Sat, 3 May 2014 01:40:45 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1WgFZq-0004iJ-4g; Fri, 02 May 2014 15:40:42 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1WgFYZ-0003td-5r for kernel-team@lists.ubuntu.com; Fri, 02 May 2014 15:39:23 +0000 Received: from c-67-160-228-185.hsd1.ca.comcast.net ([67.160.228.185] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1WgFYX-0006XR-Vq; Fri, 02 May 2014 15:39:22 +0000 Received: from kamal by fourier with local (Exim 4.82) (envelope-from ) id 1WgFYW-0001P0-1e; Fri, 02 May 2014 08:39:20 -0700 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Subject: [PATCH 3.13 134/151] thinkpad_acpi: Fix inconsistent mute LED after resume Date: Fri, 2 May 2014 08:38:42 -0700 Message-Id: <1399045139-4531-135-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1399045139-4531-1-git-send-email-kamal@canonical.com> References: <1399045139-4531-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.13 Cc: Takashi Iwai , Matthew Garrett , Kamal Mostafa X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com 3.13.11.1 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai 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 Signed-off-by: Matthew Garrett Signed-off-by: Kamal Mostafa --- 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 58b0274..7b5e523 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -8453,9 +8453,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, }; /****************************************************************************