* [PATCH v1 1/1] power: supply: core: Use device_property_string_array_count()
@ 2022-02-02 18:23 Andy Shevchenko
2022-02-11 18:55 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2022-02-02 18:23 UTC (permalink / raw)
To: Sebastian Reichel, linux-pm, linux-kernel
Cc: Sebastian Reichel, Andy Shevchenko
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>
---
drivers/power/supply/power_supply_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
index df4471e50d33..fb638774577e 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;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] power: supply: core: Use device_property_string_array_count()
2022-02-02 18:23 [PATCH v1 1/1] power: supply: core: Use device_property_string_array_count() Andy Shevchenko
@ 2022-02-11 18:55 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2022-02-11 18:55 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-pm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]
Hi,
On Wed, Feb 02, 2022 at 08:23:25PM +0200, Andy Shevchenko wrote:
> 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>
> ---
Thanks, queued.
-- Sebastian
> drivers/power/supply/power_supply_core.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
> index df4471e50d33..fb638774577e 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;
>
> --
> 2.34.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-11 18:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-02 18:23 [PATCH v1 1/1] power: supply: core: Use device_property_string_array_count() Andy Shevchenko
2022-02-11 18:55 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).