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: 9579043 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 30C326049F for ; Fri, 17 Feb 2017 07:58:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24183286A8 for ; Fri, 17 Feb 2017 07:58:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18B93286AE; Fri, 17 Feb 2017 07:58:58 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5490286A8 for ; Fri, 17 Feb 2017 07:58:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755866AbdBQH6r (ORCPT ); Fri, 17 Feb 2017 02:58:47 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:36759 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755337AbdBQH6J (ORCPT ); Fri, 17 Feb 2017 02:58:09 -0500 Received: by mail-lf0-f66.google.com with SMTP id h65so3174027lfi.3 for ; Thu, 16 Feb 2017 23:58:08 -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=KS5fOUMSAO4HsZ9VXySxhnN4iZQKO1H42IsS2kJMMoqoxCctLcRTYVJAPdL/WDFeAB K7TjboxqP/14rWiszGww2nvLq0HHrOKjTXssmm83z46vvQx9XBmFZEsoSbJXSJtd8OLZ 3OD2gIRw6HcA+ndfH6JYbXf7LdnSF9/DDDydclxUGBpvfVpdUkIc1PvbrqTpLM6pOZS4 +NFMbur+4ZU7PA3Kv9jVy7xd1ki3t505U1OJF5ZVj8nBW39dzrozh5ijz/HMfNOsZOT7 6NyWaC728wpeSC70oGxMamFf3SmePB4HyfNgoK7q9t1mzznwDI6rTfA/YSN3BHvn4OjQ 7FYQ== X-Gm-Message-State: AMke39nNAV6pAWXbI1wRCrXl/uthd9QLs9xMhWTJLgRCWO2ZzmN/DRjGT3KBNXLj6Mre6Q== 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 Cc: Alex Hung , linux-leds@vger.kernel.org, platform-driver-x86@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 5/7] dell-led: remove code related to mic mute LED 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 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.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);