]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/leds/leds-lm3697.c
Merge tag 'for-5.4/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/devic...
[linux.git] / 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;