[PATCH v8 2/6] leds: flash: Fix multicolor registration no-ops by return 0

Gene Chen gene.chen.richtek at gmail.com
Wed Nov 25 05:51:11 EST 2020


From: Gene Chen <gene_chen at richtek.com>

Fix multicolor registration no-ops by return 0

Signed-off-by: Gene Chen <gene_chen at richtek.com>
---
 include/linux/led-class-multicolor.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/led-class-multicolor.h b/include/linux/led-class-multicolor.h
index 5116f9a..dbf3832 100644
--- a/include/linux/led-class-multicolor.h
+++ b/include/linux/led-class-multicolor.h
@@ -83,7 +83,7 @@ static inline int led_classdev_multicolor_register_ext(struct device *parent,
 					    struct led_classdev_mc *mcled_cdev,
 					    struct led_init_data *init_data)
 {
-	return -EINVAL;
+	return 0;
 }
 
 static inline int led_classdev_multicolor_register(struct device *parent,
@@ -96,14 +96,14 @@ static inline void led_classdev_multicolor_unregister(struct led_classdev_mc *mc
 static inline int led_mc_calc_color_components(struct led_classdev_mc *mcled_cdev,
 					       enum led_brightness brightness)
 {
-	return -EINVAL;
+	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 -EINVAL;
+	return 0;
 }
 
 static inline int devm_led_classdev_multicolor_register(struct device *parent,
-- 
2.7.4




More information about the Linux-mediatek mailing list