Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Jacek Anaszewski
ebefec8d cc93c863

+1 -3
+1 -3
drivers/leds/leds-lm36274.c
··· 90 90 snprintf(label, sizeof(label), 91 91 "%s:%s", lm36274_data->pdev->name, name); 92 92 93 - lm36274_data->num_leds = fwnode_property_read_u32_array(child, 94 - "led-sources", 95 - NULL, 0); 93 + lm36274_data->num_leds = fwnode_property_count_u32(child, "led-sources"); 96 94 if (lm36274_data->num_leds <= 0) 97 95 return -ENODEV; 98 96