Linux-LEDs Archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>
Cc: "linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>
Subject: [PATCH] leds: trigger: stop exporting trigger_list
Date: Wed, 31 Jan 2024 15:30:53 +0100	[thread overview]
Message-ID: <ca185fb1-3a66-46b9-920e-bfecbe39c6bf@gmail.com> (raw)

682e98564ffb ("leds: trigger: panic: Simplify led_trigger_set_panic")
removed the last external user of variable trigger_list. So stop
exporting it.
If in future a need should arise again to access this variable, I think
we better add some accessor instead of exporting the variable directly.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
applies on top of for-leds-next
---
 drivers/leds/led-triggers.c | 2 +-
 drivers/leds/leds.h         | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 71cb0aee5..371000770 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -23,7 +23,7 @@
  * Nests outside led_cdev->trigger_lock
  */
 static DECLARE_RWSEM(triggers_list_lock);
-LIST_HEAD(trigger_list);
+static LIST_HEAD(trigger_list);
 
  /* Used by LED Class */
 
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h
index 345062cca..1138e2ab8 100644
--- a/drivers/leds/leds.h
+++ b/drivers/leds/leds.h
@@ -30,7 +30,6 @@ 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 struct list_head trigger_list;
 extern const char * const led_colors[LED_COLOR_ID_MAX];
 
 #endif	/* __LEDS_H_INCLUDED */
-- 
2.43.0


             reply	other threads:[~2024-01-31 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 14:30 Heiner Kallweit [this message]
2024-02-08 10:22 ` (subset) [PATCH] leds: trigger: stop exporting trigger_list Lee Jones
2024-02-08 10:23   ` Lee Jones
2024-02-08 10:43     ` Heiner Kallweit
2024-02-08 10:45       ` Lee Jones
2024-02-08 10:51         ` Heiner Kallweit

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=ca185fb1-3a66-46b9-920e-bfecbe39c6bf@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).