backlight: lm3630a: Switch to use fwnode_property_count_uXX()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 23 Jul 2019 19:34:00 +0000 (22:34 +0300)
committerLee Jones <lee.jones@linaro.org>
Mon, 12 Aug 2019 08:11:16 +0000 (09:11 +0100)
Use use fwnode_property_count_uXX() directly, that makes code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/lm3630a_bl.c

index b04b35d..2d8e819 100644 (file)
@@ -377,8 +377,7 @@ static int lm3630a_parse_led_sources(struct fwnode_handle *node,
        u32 sources[LM3630A_NUM_SINKS];
        int ret, num_sources, i;
 
-       num_sources = fwnode_property_read_u32_array(node, "led-sources", NULL,
-                                                    0);
+       num_sources = fwnode_property_count_u32(node, "led-sources");
        if (num_sources < 0)
                return default_led_sources;
        else if (num_sources > ARRAY_SIZE(sources))