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:
parent
cc93c86370
commit
ebefec8d9f
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue