linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX()
@ 2019-07-23 20:14 Andy Shevchenko
  2019-07-23 20:14 ` [PATCH v1 2/3] leds: lm36274: " Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Andy Shevchenko @ 2019-07-23 20:14 UTC (permalink / raw)
  To: Jacek Anaszewski, Pavel Machek, linux-leds, Dan Murphy; +Cc: Andy Shevchenko

Use fwnode_property_count_uXX() directly, that makes code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/leds/leds-lm3532.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c
index 180895b83b88..646100724971 100644
--- a/drivers/leds/leds-lm3532.c
+++ b/drivers/leds/leds-lm3532.c
@@ -549,10 +549,7 @@ static int lm3532_parse_node(struct lm3532_data *priv)
 				lm3532_als_configure(priv, led);
 		}
 
-		led->num_leds = fwnode_property_read_u32_array(child,
-							       "led-sources",
-							       NULL, 0);
-
+		led->num_leds = fwnode_property_count_u32(child, "led-sources");
 		if (led->num_leds > LM3532_MAX_LED_STRINGS) {
 			dev_err(&priv->client->dev, "To many LED string defined\n");
 			continue;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-07-24 21:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 20:14 [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX() Andy Shevchenko
2019-07-23 20:14 ` [PATCH v1 2/3] leds: lm36274: " Andy Shevchenko
2019-07-24 15:19   ` Dan Murphy
2019-07-23 20:14 ` [PATCH v1 3/3] leds: lm3697: " Andy Shevchenko
2019-07-24 15:20   ` Dan Murphy
2019-07-24 15:19 ` [PATCH v1 1/3] leds: lm3532: " Dan Murphy
2019-07-24 21:03 ` Jacek Anaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).