diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-07-23 23:14:59 +0300 |
---|---|---|
committer | Jacek Anaszewski <jacek.anaszewski@gmail.com> | 2019-07-25 20:08:03 +0200 |
commit | 246eab59eefc26706e59520cf20d2315377efa08 (patch) | |
tree | f5a779964547015a95597cfe0f6fd072a5588dc8 | |
parent | ebefec8d9fc07eafa7434df1a1c2447b0ea96e50 (diff) | |
download | blackbird-op-linux-246eab59eefc26706e59520cf20d2315377efa08.tar.gz blackbird-op-linux-246eab59eefc26706e59520cf20d2315377efa08.zip |
leds: lm3697: 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-lm3697.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/leds/leds-lm3697.c b/drivers/leds/leds-lm3697.c index 54e0e35df824..b71711aff8a3 100644 --- a/drivers/leds/leds-lm3697.c +++ b/drivers/leds/leds-lm3697.c @@ -244,10 +244,7 @@ static int lm3697_probe_dt(struct lm3697 *priv) led->lmu_data.lsb_brightness_reg = LM3697_CTRL_A_BRT_LSB + led->control_bank * 2; - 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 > LM3697_MAX_LED_STRINGS) { dev_err(&priv->client->dev, "To many LED strings defined\n"); continue; |