From patchwork Fri Feb 17 07:57:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBLxJlwaWXFhA==?= X-Patchwork-Id: 9579071 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 658906058A for ; Fri, 17 Feb 2017 08:05:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 555A2286AA for ; Fri, 17 Feb 2017 08:05:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A808286AD; Fri, 17 Feb 2017 08:05:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60C53286B0 for ; Fri, 17 Feb 2017 08:05:39 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 15D9126719B; Fri, 17 Feb 2017 08:58:26 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6DD4A267167; Fri, 17 Feb 2017 08:58:13 +0100 (CET) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by alsa0.perex.cz (Postfix) with ESMTP id 009BA26712B for ; Fri, 17 Feb 2017 08:58:07 +0100 (CET) Received: by mail-lf0-f65.google.com with SMTP id q89so3184087lfi.1 for ; Thu, 16 Feb 2017 23:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kempniu.pl; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EU0qIG1adX1UTXiddARtYBGzFyVPSSb9giethBFtnCA=; b=bZWd6u/exnT1Q20DV+OZIt1DtJEVLeNvbG7v31cuDQF5xqAlLPot6f4YJbeWyKGUpc VnI8YSSStFgjL/W9AyPDmHqSBOFlMnKxiFwayMtQVgcAyN/6jqDqDd8MmqdpA33YHJDf WOApCjlW/f2fPQXk79nE4DWuaG8A01HRqBiEs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EU0qIG1adX1UTXiddARtYBGzFyVPSSb9giethBFtnCA=; b=Mrr9sjiooa4zmt340XhyyigNY8PfVEboLdbXJZHwSBpcTUHI0ob5CHL7Mthf9itE5i QhixFj/0AWIied0uYl8r5vk/QYNNkwudo+rCFBt29XeexXjBf99zC2cLtPrLto3neNYm TJ+xpOwFRgff5fiI8+3cFYVK5c2xxHXbm/3BTDqrDHAbGE1oGP0yfutDf/KIZLbFCDcv lPBya7K/Wrru61yXs1hDywlrniKhXFw1OvGLT6eZDuM7kxi93FzdPaOcvihAvIXEw/AE oDv//vjCfAEQO1l8DdSKgOCdfNPiPuKCzQkynBbYwtgC5l9p3FYXENODLVEIa7wn8+oC h9JA== X-Gm-Message-State: AMke39l0C6LCdD7VW/vBN9YlSJRMiod2bkPUDO/6/fljfVXC1r81cdCgQZLWmT1yXyGnEw== X-Received: by 10.46.87.67 with SMTP id r3mr1751544ljd.31.1487318287169; Thu, 16 Feb 2017 23:58:07 -0800 (PST) Received: from ozzy.nask.waw.pl ([2001:a10:160:3::3]) by smtp.googlemail.com with ESMTPSA id 206sm2336457ljf.35.2017.02.16.23.58.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2017 23:58:06 -0800 (PST) From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= To: Richard Purdie , Jacek Anaszewski , Pavel Machek , Matthew Garrett , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Darren Hart , Andy Shevchenko , Jaroslav Kysela , Takashi Iwai Date: Fri, 17 Feb 2017 08:57:51 +0100 Message-Id: <20170217075753.12702-6-kernel@kempniu.pl> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170217075753.12702-1-kernel@kempniu.pl> References: <20170217075753.12702-1-kernel@kempniu.pl> MIME-Version: 1.0 Cc: linux-kernel@vger.kernel.org, Alex Hung , alsa-devel@alsa-project.org, linux-leds@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [alsa-devel] [PATCH v3 5/7] dell-led: remove code related to mic mute LED X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" 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 X-Virus-Scanned: ClamAV using ClamSMTP With dell_micmute_led_set() moved to drivers/platform/x86/dell-laptop.c, all remnants of the mic mute LED handling code can be removed from drivers/leds/dell-led.c, restoring it back to the state it was in before commit db6d8cc00773 ("dell-led: add mic mute led interface"). Signed-off-by: Michał Kępień Tested-by: Alex Hung Reviewed-by: Pali Rohár --- drivers/leds/Kconfig | 1 - drivers/leds/dell-led.c | 25 +++++++------------------ 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 275f467956ee..8d1b4c9b3bda 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -467,7 +467,6 @@ config LEDS_DELL_NETBOOKS tristate "External LED on Dell Business Netbooks" depends on LEDS_CLASS depends on X86 && ACPI_WMI - depends on DELL_SMBIOS help This adds support for the Latitude 2100 and similar notebooks that have an external LED. diff --git a/drivers/leds/dell-led.c b/drivers/leds/dell-led.c index c9cc36a7c890..e5c57389efd6 100644 --- a/drivers/leds/dell-led.c +++ b/drivers/leds/dell-led.c @@ -15,15 +15,12 @@ #include #include #include -#include -#include "../platform/x86/dell-smbios.h" MODULE_AUTHOR("Louis Davis/Jim Dailey"); MODULE_DESCRIPTION("Dell LED Control Driver"); MODULE_LICENSE("GPL"); #define DELL_LED_BIOS_GUID "F6E4FE6E-909D-47cb-8BAB-C9F6F2F8D396" -#define DELL_APP_GUID "A80593CE-A997-11DA-B012-B622A1EF5492" MODULE_ALIAS("wmi:" DELL_LED_BIOS_GUID); /* Error Result Codes: */ @@ -184,29 +181,21 @@ static int __init dell_led_init(void) { int error = 0; - if (!wmi_has_guid(DELL_LED_BIOS_GUID) && !wmi_has_guid(DELL_APP_GUID)) + if (!wmi_has_guid(DELL_LED_BIOS_GUID)) return -ENODEV; - if (wmi_has_guid(DELL_LED_BIOS_GUID)) { - error = led_off(); - if (error != 0) - return -ENODEV; - - error = led_classdev_register(NULL, &dell_led); - } + error = led_off(); + if (error != 0) + return -ENODEV; - return error; + return led_classdev_register(NULL, &dell_led); } static void __exit dell_led_exit(void) { - int error = 0; + led_classdev_unregister(&dell_led); - if (wmi_has_guid(DELL_LED_BIOS_GUID)) { - error = led_off(); - if (error == 0) - led_classdev_unregister(&dell_led); - } + led_off(); } module_init(dell_led_init);