Commit 072e2c81 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Lee Jones

backlight: lm3630a: Switch to use fwnode_property_count_uXX()

Use use fwnode_property_count_uXX() directly, that makes code neater.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 865cac14
...@@ -377,8 +377,7 @@ static int lm3630a_parse_led_sources(struct fwnode_handle *node, ...@@ -377,8 +377,7 @@ static int lm3630a_parse_led_sources(struct fwnode_handle *node,
u32 sources[LM3630A_NUM_SINKS]; u32 sources[LM3630A_NUM_SINKS];
int ret, num_sources, i; int ret, num_sources, i;
num_sources = fwnode_property_read_u32_array(node, "led-sources", NULL, num_sources = fwnode_property_count_u32(node, "led-sources");
0);
if (num_sources < 0) if (num_sources < 0)
return default_led_sources; return default_led_sources;
else if (num_sources > ARRAY_SIZE(sources)) else if (num_sources > ARRAY_SIZE(sources))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment