Skip to content

Commit

Permalink
leds: lm3532: Switch to use fwnode_property_count_uXX()
Browse files Browse the repository at this point in the history
Use fwnode_property_count_uXX() directly, that makes code neater.

Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Dan Murphy <[email protected]>
Signed-off-by: Jacek Anaszewski <[email protected]>
  • Loading branch information
andy-shev authored and jacek-anaszewski committed Jul 25, 2019
1 parent 1817208 commit cc93c86
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/leds/leds-lm3532.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cc93c86

Please sign in to comment.