diff mbox series

[v1,1/6] device property: Use fwnode_property_string_array_count()

Message ID 20230808162800.61651-2-andriy.shevchenko@linux.intel.com
State Accepted
Commit 086386311b3620059d0253eda511f88ca4cdeceb
Headers show
Series iio: Introduce and use device_property_match_property_string() | expand

Commit Message

Andy Shevchenko Aug. 8, 2023, 4:27 p.m. UTC
Use fwnode_property_string_array_count() instead of open coded variant.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/base/property.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki Oct. 17, 2023, 7:14 p.m. UTC | #1
On Tue, Aug 8, 2023 at 6:31 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Use fwnode_property_string_array_count() instead of open coded variant.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/base/property.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 8c40abed7852..3bb9505f1631 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -473,7 +473,7 @@ int fwnode_property_match_string(const struct fwnode_handle *fwnode,
>         const char **values;
>         int nval, ret;
>
> -       nval = fwnode_property_read_string_array(fwnode, propname, NULL, 0);
> +       nval = fwnode_property_string_array_count(fwnode, propname);
>         if (nval < 0)
>                 return nval;
>
> --
> 2.40.0.1.gaa8946217a0b
>
diff mbox series

Patch

diff --git a/drivers/base/property.c b/drivers/base/property.c
index 8c40abed7852..3bb9505f1631 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -473,7 +473,7 @@  int fwnode_property_match_string(const struct fwnode_handle *fwnode,
 	const char **values;
 	int nval, ret;
 
-	nval = fwnode_property_read_string_array(fwnode, propname, NULL, 0);
+	nval = fwnode_property_string_array_count(fwnode, propname);
 	if (nval < 0)
 		return nval;