From: Andy Shevchenko Date: Tue, 23 Jul 2019 20:14:57 +0000 (+0300) Subject: leds: lm3532: Switch to use fwnode_property_count_uXX() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cc93c86370086519f69aefbbac18375f0b489a0e;p=linux.git leds: lm3532: Switch to use fwnode_property_count_uXX() Use fwnode_property_count_uXX() directly, that makes code neater. Signed-off-by: Andy Shevchenko Acked-by: Dan Murphy Signed-off-by: Jacek Anaszewski --- diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c index 180895b83b888..6461007249717 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;