From: Takashi Iwai Subject: Re: [PATCH] thinkpad_acpi: Fix inconsistent mute LED after resume Date: Thu, 13 Feb 2014 09:35:30 +0100 Message-ID: References: <1392219165-20888-1-git-send-email-tiwai@suse.de> <1392237456.1201.2.camel@x230> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from cantor2.suse.de ([195.135.220.15]:59416 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752519AbaBMIfb (ORCPT ); Thu, 13 Feb 2014 03:35:31 -0500 In-Reply-To: <1392237456.1201.2.camel@x230> Sender: platform-driver-x86-owner@vger.kernel.org List-ID: To: Matthew Garrett Cc: rauchwolke@gmx.net, "david.henningsson@canonical.com" , "ibm-acpi-devel@lists.sourceforge.net" , "platform-driver-x86@vger.kernel.org" , "ibm-acpi@hmh.eng.br" , "linux-kernel@vger.kernel.org" At Wed, 12 Feb 2014 20:37:36 +0000, Matthew Garrett wrote: > > On Wed, 2014-02-12 at 16:32 +0100, Takashi Iwai wrote: > > The mute LED states have to be restored after resume. > > Oh, never mind, we're not doing this through the LED class, are we? Good point. It seems that leds_class has pm_ops but it's enabled only when a flag is set. I added the original bug reporter to Cc. (Don't know the name, Bugzilla shows only the email address.) Could you check the patch below works instead of the previous fix? Takashi --- diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index defb6afc1409..16edf75d9c00 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -4796,6 +4796,7 @@ static struct tpacpi_led_classdev tpacpi_led_thinklight = { .name = "tpacpi::thinklight", .brightness_set = &light_sysfs_set, .brightness_get = &light_sysfs_get, + .flags = LED_CORE_SUSPENDRESUME, } };