Commit cc93c863 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jacek Anaszewski

leds: lm3532: Switch to use fwnode_property_count_uXX()

Use fwnode_property_count_uXX() directly, that makes code neater.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent 1817208e
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment