Skip to contentSkip to conversation

backlight: lm3630a: Switch to use fwnode_property_count_uXX()

PATCH Applied Andy Shevchenko 3 participants 5 messages Jul 23, 2019 – Sep 2, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backlight: lm3630a: Switch to use fwnode_property_count_uXX()

Use use fwnode_property_count_uXX() directly, that makes code neater.

---
 drivers/video/backlight/lm3630a_bl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/video/backlight/lm3630a_bl.c +1 -2
index b04b35d007a2..2d8e8192e4e2 100644
@@ -377,8 +377,7 @@ static int lm3630a_parse_led_sources(struct fwnode_handle *node,
 	u32 sources[LM3630A_NUM_SINKS];
 	int ret, num_sources, i;
 
-	num_sources = fwnode_property_read_u32_array(node, "led-sources", NULL,
-						     0);
+	num_sources = fwnode_property_count_u32(node, "led-sources");
 	if (num_sources < 0)
 		return default_led_sources;
 	else if (num_sources > ARRAY_SIZE(sources))
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Andy Shevchenko

Use use fwnode_property_count_uXX() directly, that makes code neater.

Quoted 21 lines
---
 drivers/video/backlight/lm3630a_bl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/video/backlight/lm3630a_bl.c +1 -2
index b04b35d007a2..2d8e8192e4e2 100644
@@ -377,8 +377,7 @@ static int lm3630a_parse_led_sources(struct fwnode_handle *node,
 	u32 sources[LM3630A_NUM_SINKS];
 	int ret, num_sources, i;
 
-	num_sources = fwnode_property_read_u32_array(node, "led-sources", NULL,
-						     0);
+	num_sources = fwnode_property_count_u32(node, "led-sources");
 	if (num_sources < 0)
 		return default_led_sources;
 	else if (num_sources > ARRAY_SIZE(sources))
Signature · 1 line
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Applied
#2 lore raw
In reply to Andy Shevchenko
Quoted 6 lines · Andy Shevchenko

Use use fwnode_property_count_uXX() directly, that makes code neater.

---
 drivers/video/backlight/lm3630a_bl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.

Signature · 8 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw
Quoted 10 lines · Lee Jones
Quoted 6 lines · Andy Shevchenko

Use use fwnode_property_count_uXX() directly, that makes code neater.

---
 drivers/video/backlight/lm3630a_bl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.

Thanks.
However, I haven't still noticed a trace of it in Linux next.

Signature · 8 lines
With Best Regards,
Andy Shevchenko


_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw
Quoted 10 lines · Andy Shevchenko
Quoted 9 lines · Lee Jones
Quoted 6 lines · Andy Shevchenko

Use use fwnode_property_count_uXX() directly, that makes code neater.

---
 drivers/video/backlight/lm3630a_bl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 4 lines
Quoted 1 line

Applied, thanks.

Thanks.
However, I haven't still noticed a trace of it in Linux next.

Just did a big push. It should be in there by tomorrow.

Signature · 8 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel