leds: lm36274: Switch to use fwnode_property_count_uXX()

Use fwnode_property_count_uXX() directly, that makes code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
This commit is contained in:
Andy Shevchenko 2019-07-23 23:14:58 +03:00 committed by Jacek Anaszewski
parent cc93c86370
commit ebefec8d9f
1 changed files with 1 additions and 3 deletions

View File

@ -90,9 +90,7 @@ static int lm36274_parse_dt(struct lm36274 *lm36274_data)
snprintf(label, sizeof(label),
"%s:%s", lm36274_data->pdev->name, name);
lm36274_data->num_leds = fwnode_property_read_u32_array(child,
"led-sources",
NULL, 0);
lm36274_data->num_leds = fwnode_property_count_u32(child, "led-sources");
if (lm36274_data->num_leds <= 0)
return -ENODEV;