From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Cc: "Ayman Bagabas" <ayman.bagabas@gmail.com>,
"Henrique de Moraes Holschuh" <hmh@hmh.eng.br>,
platform-driver-x86@vger.kernel.org,
"Hui Wang" <hui.wang@canonical.com>,
ibm-acpi-devel@lists.sourceforge.net,
"Jacek Anaszewski" <jacek.anaszewski@gmail.com>,
"Pavel Machek" <pavel@ucw.cz>,
"Pali Rohár" <pali.rohar@gmail.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
linux-leds@vger.kernel.org
Subject: [PATCH v2 5/6] platform/x86: dell-laptop: Drop superfluous exported function
Date: Thu, 29 Nov 2018 08:31:30 +0100 [thread overview]
Message-ID: <20181129073131.4338-6-tiwai@suse.de> (raw)
In-Reply-To: <20181129073131.4338-1-tiwai@suse.de>
Since we've switched to the LED trigger for binding with HD-audio,
we can drop the exported function as well as the whole
linux/dell-led.h.
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
drivers/platform/x86/dell-laptop.c | 22 +++++-----------------
include/linux/dell-led.h | 7 -------
2 files changed, 5 insertions(+), 24 deletions(-)
delete mode 100644 include/linux/dell-led.h
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 0db2dbf7b0d1..fb071e6a5058 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -29,7 +29,6 @@
#include <linux/mm.h>
#include <linux/i8042.h>
#include <linux/debugfs.h>
-#include <linux/dell-led.h>
#include <linux/seq_file.h>
#include <acpi/video.h>
#include "dell-rbtn.h"
@@ -2109,17 +2108,17 @@ static struct notifier_block dell_laptop_notifier = {
.notifier_call = dell_laptop_notifier_call,
};
-int dell_micmute_led_set(int state)
+static int micmute_led_set(struct led_classdev *led_cdev,
+ enum led_brightness brightness)
{
struct calling_interface_buffer buffer;
struct calling_interface_token *token;
+ int state = brightness != LED_OFF;
if (state == 0)
token = dell_smbios_find_token(GLOBAL_MIC_MUTE_DISABLE);
- else if (state == 1)
- token = dell_smbios_find_token(GLOBAL_MIC_MUTE_ENABLE);
else
- return -EINVAL;
+ token = dell_smbios_find_token(GLOBAL_MIC_MUTE_ENABLE);
if (!token)
return -ENODEV;
@@ -2127,18 +2126,7 @@ int dell_micmute_led_set(int state)
dell_fill_request(&buffer, token->location, token->value, 0, 0);
dell_send_request(&buffer, CLASS_TOKEN_WRITE, SELECT_TOKEN_STD);
- return state;
-}
-EXPORT_SYMBOL_GPL(dell_micmute_led_set);
-
-static int micmute_led_set(struct led_classdev *led_cdev,
- enum led_brightness brightness)
-{
- int state = brightness != LED_OFF;
- int err;
-
- err = dell_micmute_led_set(state);
- return err < 0 ? err : 0;
+ return 0;
}
static struct led_classdev micmute_led_cdev = {
diff --git a/include/linux/dell-led.h b/include/linux/dell-led.h
deleted file mode 100644
index 92521471517f..000000000000
--- a/include/linux/dell-led.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __DELL_LED_H__
-#define __DELL_LED_H__
-
-int dell_micmute_led_set(int on);
-
-#endif
--
2.19.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2018-11-29 7:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-29 7:31 [PATCH v2 0/6] Introduce audio-mute LED trigger (and conversions to it) Takashi Iwai
2018-11-29 7:31 ` [PATCH v2 2/6] platform/x86: dell-laptop: Add micmute LED trigger support Takashi Iwai
2018-11-29 7:31 ` [PATCH v2 3/6] platform/x86: thinkpad_acpi: Add audio mute LED classdev support Takashi Iwai
[not found] ` <20181129073131.4338-1-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-11-29 7:31 ` [PATCH v2 1/6] leds: trigger: Introduce audio mute LED trigger Takashi Iwai
2018-11-29 7:31 ` [PATCH v2 4/6] ALSA: hda - Support led audio trigger Takashi Iwai
2018-11-29 7:31 ` Takashi Iwai [this message]
2018-11-29 7:31 ` [PATCH v2 6/6] platform/x86: thinkpad_acpi: Drop superfluous exported function Takashi Iwai
2018-11-29 18:56 ` [PATCH v2 0/6] Introduce audio-mute LED trigger (and conversions to it) Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181129073131.4338-6-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ayman.bagabas@gmail.com \
--cc=hmh@hmh.eng.br \
--cc=hui.wang@canonical.com \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-leds@vger.kernel.org \
--cc=pali.rohar@gmail.com \
--cc=pavel@ucw.cz \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox