592111fb9545be5f5b504137f4571bd737f4e7c0
[openwrt/staging/ansuel.git] /
1 From 156a5bb89ca6f3edd2be0bfd0de15e575442927e Mon Sep 17 00:00:00 2001
2 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
3 Date: Tue, 3 Jan 2023 15:12:47 +0200
4 Subject: [PATCH] leds: Move led_init_default_state_get() to the global header
5
6 There are users inside and outside LED framework that have implemented
7 a local copy of led_init_default_state_get(). In order to deduplicate
8 that, as the first step move the declaration from LED header to the
9 global one.
10
11 Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
12 Signed-off-by: Lee Jones <lee@kernel.org>
13 Link: https://lore.kernel.org/r/20230103131256.33894-3-andriy.shevchenko@linux.intel.com
14 ---
15 drivers/leds/leds.h | 1 -
16 include/linux/leds.h | 2 ++
17 2 files changed, 2 insertions(+), 1 deletion(-)
18
19 --- a/drivers/leds/leds.h
20 +++ b/drivers/leds/leds.h
21 @@ -27,7 +27,6 @@ ssize_t led_trigger_read(struct file *fi
22 ssize_t led_trigger_write(struct file *filp, struct kobject *kobj,
23 struct bin_attribute *bin_attr, char *buf,
24 loff_t pos, size_t count);
25 -enum led_default_state led_init_default_state_get(struct fwnode_handle *fwnode);
26
27 extern struct rw_semaphore leds_list_lock;
28 extern struct list_head leds_list;
29 --- a/include/linux/leds.h
30 +++ b/include/linux/leds.h
31 @@ -63,6 +63,8 @@ struct led_init_data {
32 bool devname_mandatory;
33 };
34
35 +enum led_default_state led_init_default_state_get(struct fwnode_handle *fwnode);
36 +
37 struct led_hw_trigger_type {
38 int dummy;
39 };