Commit 1c97db17 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Sebastian Reichel

power: supply: core: Use device_property_string_array_count()

Use device_property_string_array_count() to get number of strings
in a string array property.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent e83c7204
......@@ -283,8 +283,7 @@ static int power_supply_check_supplies(struct power_supply *psy)
if (!psy->dev.parent)
return 0;
nval = device_property_read_string_array(psy->dev.parent,
"supplied-from", NULL, 0);
nval = device_property_string_array_count(psy->dev.parent, "supplied-from");
if (nval <= 0)
return 0;
......
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