summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lm3532.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-07-23 23:14:57 +0300
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2019-07-25 20:08:02 +0200
commitcc93c86370086519f69aefbbac18375f0b489a0e (patch)
tree9fe17856067121d06e0e08beef1831e6be68475b /drivers/leds/leds-lm3532.c
parent1817208e14c6f7b451c64d7127e130e5ed926f54 (diff)
downloadlinux-cc93c86370086519f69aefbbac18375f0b489a0e.tar.bz2
leds: lm3532: 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>
Diffstat (limited to 'drivers/leds/leds-lm3532.c')
-rw-r--r--drivers/leds/leds-lm3532.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c
index 180895b83b88..646100724971 100644
--- a/drivers/leds/leds-lm3532.c
+++ b/drivers/leds/leds-lm3532.c
@@ -549,10 +549,7 @@ static int lm3532_parse_node(struct lm3532_data *priv)
lm3532_als_configure(priv, led);
}
- led->num_leds = fwnode_property_read_u32_array(child,
- "led-sources",
- NULL, 0);
-
+ led->num_leds = fwnode_property_count_u32(child, "led-sources");
if (led->num_leds > LM3532_MAX_LED_STRINGS) {
dev_err(&priv->client->dev, "To many LED string defined\n");
continue;