Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

backlight: lm3630a: Switch to use fwnode_property_count_uXX()

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>

authored by

Andy Shevchenko and committed by
Lee Jones
072e2c81 865cac14

+1 -2
+1 -2
drivers/video/backlight/lm3630a_bl.c
··· 377 377 u32 sources[LM3630A_NUM_SINKS]; 378 378 int ret, num_sources, i; 379 379 380 - num_sources = fwnode_property_read_u32_array(node, "led-sources", NULL, 381 - 0); 380 + num_sources = fwnode_property_count_u32(node, "led-sources"); 382 381 if (num_sources < 0) 383 382 return default_led_sources; 384 383 else if (num_sources > ARRAY_SIZE(sources))