power: supply: core: Use device_property_string_array_count()
PATCH 1/1 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 <[email protected]>
--- drivers/power/supply/power_supply_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/power/supply/power_supply_core.c +1 -2
@@ -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 ;
Signature · 1 line
2.34.1
Hi,
Quoted 5 lines · Andy Shevchenko
Use
device_property_string_array_count()to get number of strings in a string array property.Signed-off-by Andy Shevchenko <[email protected]>---
Thanks, queued.
-- Sebastian
Quoted 20 lines
drivers/power/supply/power_supply_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/power/supply/power_supply_core.c +1
-2@@ -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 ;Signature · 1 line
2.34.1