summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-07-23 23:14:58 +0300
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2019-07-25 20:08:03 +0200
commitebefec8d9fc07eafa7434df1a1c2447b0ea96e50 (patch)
treecc85f258b7613495211ccf9b4d1bafe074d1bc11
parentcc93c86370086519f69aefbbac18375f0b489a0e (diff)
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>
-rw-r--r--drivers/leds/leds-lm36274.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/leds/leds-lm36274.c b/drivers/leds/leds-lm36274.c
index ed9dc857ec8f..836b60c9a2b8 100644
--- a/drivers/leds/leds-lm36274.c
+++ b/drivers/leds/leds-lm36274.c
@@ -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;