diff options
author | Arnd Bergmann <arnd@arndb.de> | 2024-01-09 10:06:40 +0100 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-03-07 08:48:03 +0000 |
commit | 09e3f3244e8480d53873bb86a3808edaa3f4e314 (patch) | |
tree | fdae56f8bfc15869ee1a81f8ca17f7c404f032c0 /include/linux/led-class-multicolor.h | |
parent | 211f8ec9400b58fb97cf4b6bd7033781e889bf53 (diff) | |
download | linux-09e3f3244e8480d53873bb86a3808edaa3f4e314.tar.gz linux-09e3f3244e8480d53873bb86a3808edaa3f4e314.tar.bz2 linux-09e3f3244e8480d53873bb86a3808edaa3f4e314.zip |
leds: Make flash and multicolor dependencies unconditional
Along the same lines as making devm_led_classdev_register() declared
extern unconditional, do the same thing for the two sub-classes
that have similar stubs.
The users of these interfaces go to great lengths to allow building
with both the generic leds API and the extended version, but realistically
there is not much use in this, so just simplify it to always rely
on it and remove the confusing fallback logic.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240109090715.982332-2-arnd@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include/linux/led-class-multicolor.h')
-rw-r--r-- | include/linux/led-class-multicolor.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/include/linux/led-class-multicolor.h b/include/linux/led-class-multicolor.h index 210d57bcd767..db9f34c6736e 100644 --- a/include/linux/led-class-multicolor.h +++ b/include/linux/led-class-multicolor.h @@ -30,7 +30,6 @@ static inline struct led_classdev_mc *lcdev_to_mccdev( return container_of(led_cdev, struct led_classdev_mc, led_cdev); } -#if IS_ENABLED(CONFIG_LEDS_CLASS_MULTICOLOR) /** * led_classdev_multicolor_register_ext - register a new object of led_classdev * class with support for multicolor LEDs @@ -64,34 +63,6 @@ int devm_led_classdev_multicolor_register_ext(struct device *parent, void devm_led_classdev_multicolor_unregister(struct device *parent, struct led_classdev_mc *mcled_cdev); -#else - -static inline int led_classdev_multicolor_register_ext(struct device *parent, - struct led_classdev_mc *mcled_cdev, - struct led_init_data *init_data) -{ - return 0; -} - -static inline void led_classdev_multicolor_unregister(struct led_classdev_mc *mcled_cdev) {}; -static inline int led_mc_calc_color_components(struct led_classdev_mc *mcled_cdev, - enum led_brightness brightness) -{ - return 0; -} - -static inline int devm_led_classdev_multicolor_register_ext(struct device *parent, - struct led_classdev_mc *mcled_cdev, - struct led_init_data *init_data) -{ - return 0; -} - -static inline void devm_led_classdev_multicolor_unregister(struct device *parent, - struct led_classdev_mc *mcled_cdev) -{}; - -#endif /* IS_ENABLED(CONFIG_LEDS_CLASS_MULTICOLOR) */ static inline int led_classdev_multicolor_register(struct device *parent, struct led_classdev_mc *mcled_cdev) |