mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 23:21:31 +00:00
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
e83c7204f1
commit
1c97db1747
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user