From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 3/6] platform/x86: thinkpad_acpi: Add audio mute LED classdev support Date: Tue, 27 Nov 2018 12:04:51 +0100 Message-ID: References: <20181126171126.20280-1-tiwai@suse.de> <20181126171126.20280-4-tiwai@suse.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Andy Shevchenko Cc: ALSA Development Mailing List , Ayman Bagabas , Platform Driver , Hui Wang , ibm-acpi-devel@lists.sourceforge.net, Jacek Anaszewski , Pavel Machek , Pali =?UTF-8?B?Um9ow6Fy?= , Andy Shevchenko , Linux LED Subsystem List-Id: platform-driver-x86.vger.kernel.org On Tue, 27 Nov 2018 00:04:40 +0100, Andy Shevchenko wrote: > > On Mon, Nov 26, 2018 at 7:13 PM Takashi Iwai wrote: > > > > In the upcoming change, the binding of audio mute / mic-mute LED > > controls will be switched with LED trigger. This patch is the last > > piece of preparation: adding the audio mute / mic-mute LED class > > devices to thinkpad_acpi driver. > > > > Two devices, tpacpi::mute and tpacpi::micmute, will be added for > > controlling the mute LED and mic-mute LED, respectively. > > > > Also this selects CONFIG_LEDS_TRIGGERS and CONFIG_LEDS_TRIGGERS_AUDIO > > unconditionally. Strictly speaking, these aren't 100% mandatory, but > > leaving these manual selections would lead to a functional regression > > easily once after converting from the dynamic symbol binding to the > > LEDs trigger in a later patch. > > > + if (!ACPI_SUCCESS(acpi_get_handle(hkey_handle, t->name, &temp))) { > > ACPI_FAILURE() > > > t->state = -ENODEV; > > + continue; > > + } > > > + err = led_classdev_register(&tpacpi_pdev->dev, &mute_led_cdev[i]); > > + if (err < 0) { > > > + while (--i >= 0) > > Needs { } due to two liner below. > > Might be converted to simple > > while (i--) { > ... > } > > btw. Both addressed now. Thanks. Takashi