From d35d0c9de762e003129dfc1240df7152a4bc31e8 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 3 Jan 2023 15:12:46 +0200 Subject: leds: Add missing includes and forward declarations in leds.h Add missing includes and forward declarations to leds.h. While at it, replace headers by forward declarations and vise versa. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-2-andriy.shevchenko@linux.intel.com --- include/linux/leds.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'include/linux') diff --git a/include/linux/leds.h b/include/linux/leds.h index 31cb74b90ffc..4df46a85e5c2 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -10,17 +10,21 @@ #include #include -#include -#include #include #include #include #include +#include #include -struct device; -struct led_pattern; +struct attribute_group; struct device_node; +struct fwnode_handle; +struct gpio_desc; +struct kernfs_node; +struct led_pattern; +struct platform_device; + /* * LED Core */ @@ -529,7 +533,6 @@ struct led_properties { const char *label; }; -struct gpio_desc; typedef int (*gpio_blink_set_t)(struct gpio_desc *desc, int state, unsigned long *delay_on, unsigned long *delay_off); -- cgit v1.2.3 From 156a5bb89ca6f3edd2be0bfd0de15e575442927e Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 3 Jan 2023 15:12:47 +0200 Subject: leds: Move led_init_default_state_get() to the global header There are users inside and outside LED framework that have implemented a local copy of led_init_default_state_get(). In order to deduplicate that, as the first step move the declaration from LED header to the global one. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-3-andriy.shevchenko@linux.intel.com --- drivers/leds/leds.h | 1 - include/linux/leds.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h index aa64757a4d89..345062ccabda 100644 --- a/drivers/leds/leds.h +++ b/drivers/leds/leds.h @@ -27,7 +27,6 @@ ssize_t led_trigger_read(struct file *filp, struct kobject *kobj, ssize_t led_trigger_write(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t pos, size_t count); -enum led_default_state led_init_default_state_get(struct fwnode_handle *fwnode); extern struct rw_semaphore leds_list_lock; extern struct list_head leds_list; diff --git a/include/linux/leds.h b/include/linux/leds.h index 4df46a85e5c2..d71201a968b6 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -82,6 +82,8 @@ struct led_init_data { bool devname_mandatory; }; +enum led_default_state led_init_default_state_get(struct fwnode_handle *fwnode); + struct led_hw_trigger_type { int dummy; }; -- cgit v1.2.3