Skip to content

Commit 97361c3

Browse files
author
Al Stone
committed
power: supply: core: Use device_property_string_array_count()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2071846 Tested: This is one of a series of patch sets to enable Arm SystemReady IR support in the kernel for NXP i.MX8 platforms. This set updates the power subsystem. This set has been tested via simple boot tests and the CI loop. commit 1c97db1 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Wed Feb 2 20:23:25 2022 +0200 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> (cherry picked from commit 1c97db1) Signed-off-by: Al Stone <ahs3@redhat.com>
1 parent 851c030 commit 97361c3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/power/supply/power_supply_core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@ static int power_supply_check_supplies(struct power_supply *psy)
283283
if (!psy->dev.parent)
284284
return 0;
285285

286-
nval = device_property_read_string_array(psy->dev.parent,
287-
"supplied-from", NULL, 0);
286+
nval = device_property_string_array_count(psy->dev.parent, "supplied-from");
288287
if (nval <= 0)
289288
return 0;
290289

0 commit comments

Comments
 (0)