[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240520-cros_ec-led-v1-3-4068fc5c051a@weissschuh.net>
Date: Mon, 20 May 2024 12:00:31 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>,
Thomas Weißschuh <thomas@...ssschuh.net>,
Benson Leung <bleung@...omium.org>, Guenter Roeck <groeck@...omium.org>
Cc: linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
chrome-platform@...ts.linux.dev, Dustin Howett <dustin@...ett.net>,
Mario Limonciello <mario.limonciello@....com>,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH 3/5] leds: unexport led_colors array
There are no external users left, make the array static.
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
drivers/leds/led-core.c | 3 +--
drivers/leds/leds.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c
index 04a49958458e..94f8b47fc025 100644
--- a/drivers/leds/led-core.c
+++ b/drivers/leds/led-core.c
@@ -25,7 +25,7 @@ EXPORT_SYMBOL_GPL(leds_list_lock);
LIST_HEAD(leds_list);
EXPORT_SYMBOL_GPL(leds_list);
-const char * const led_colors[LED_COLOR_ID_MAX] = {
+static const char * const led_colors[LED_COLOR_ID_MAX] = {
[LED_COLOR_ID_WHITE] = "white",
[LED_COLOR_ID_RED] = "red",
[LED_COLOR_ID_GREEN] = "green",
@@ -42,7 +42,6 @@ const char * const led_colors[LED_COLOR_ID_MAX] = {
[LED_COLOR_ID_CYAN] = "cyan",
[LED_COLOR_ID_LIME] = "lime",
};
-EXPORT_SYMBOL_GPL(led_colors);
static int __led_set_brightness(struct led_classdev *led_cdev, unsigned int value)
{
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h
index 1138e2ab82e5..d7999e7372a4 100644
--- a/drivers/leds/leds.h
+++ b/drivers/leds/leds.h
@@ -30,6 +30,5 @@ ssize_t led_trigger_write(struct file *filp, struct kobject *kobj,
extern struct rw_semaphore leds_list_lock;
extern struct list_head leds_list;
-extern const char * const led_colors[LED_COLOR_ID_MAX];
#endif /* __LEDS_H_INCLUDED */
--
2.45.1
Powered by blists - more mailing lists