]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
leds: lm36274: Switch to use fwnode_property_count_uXX()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 23 Jul 2019 20:14:58 +0000 (23:14 +0300)
committerJacek Anaszewski <jacek.anaszewski@gmail.com>
Thu, 25 Jul 2019 18:08:03 +0000 (20:08 +0200)
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>
drivers/leds/leds-lm36274.c

index ed9dc857ec8f324abef9ed2009109304262e6644..836b60c9a2b80865461e586556e230761fcc2014 100644 (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;