device property: Use fwnode_property_string_array_count()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 8 Aug 2023 16:27:55 +0000 (19:27 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 16 Nov 2023 19:10:26 +0000 (19:10 +0000)
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>
Link: https://lore.kernel.org/r/20230808162800.61651-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/base/property.c

index 8c40abed785247b6262aac141d6f02f876a66835..3bb9505f1631a4cdb89bd1d23a86876adcbdc63e 100644 (file)
@@ -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;