diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-02-02 20:23:25 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2022-02-11 19:54:21 +0100 |
commit | 1c97db1747b756611f0d26ea7fb2ed2d93f90fcc (patch) | |
tree | 6728be18a4b5bfd1210a9a9a81288866597a80af /drivers/power | |
parent | e83c7204f185c598b5b933ea5511b062b26afb67 (diff) | |
download | linux-stable-1c97db1747b756611f0d26ea7fb2ed2d93f90fcc.tar.gz linux-stable-1c97db1747b756611f0d26ea7fb2ed2d93f90fcc.tar.bz2 linux-stable-1c97db1747b756611f0d26ea7fb2ed2d93f90fcc.zip |
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>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/power_supply_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c index 1a2440e212a7..8dbd1197cc62 100644 --- a/drivers/power/supply/power_supply_core.c +++ b/drivers/power/supply/power_supply_core.c @@ -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; |