]> Git Repo - J-linux.git/commitdiff
leds: lm3697: Switch to use fwnode_property_count_uXX()
authorAndy Shevchenko <[email protected]>
Tue, 23 Jul 2019 20:14:59 +0000 (23:14 +0300)
committerJacek Anaszewski <[email protected]>
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 <[email protected]>
Acked-by: Dan Murphy <[email protected]>
Signed-off-by: Jacek Anaszewski <[email protected]>
drivers/leds/leds-lm3697.c

index 54e0e35df8246e54781b0f97cfb5ab23ff49957c..b71711aff8a3cb3fa8e9983ff34e1a19fdcc86ab 100644 (file)
@@ -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;
This page took 0.053075 seconds and 4 git commands to generate.