1
0
Fork 0

device property: fallback to pset when gettng one string

The one string as an equivalent to an array of one element. Allow user to read
one string as a plain string.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
hifive-unleashed-5.1
Andy Shevchenko 2015-08-10 19:56:47 +03:00 committed by Rafael J. Wysocki
parent ecc87eed7b
commit 4f73b0654d
1 changed files with 2 additions and 1 deletions

View File

@ -462,7 +462,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode,
return acpi_dev_prop_read(to_acpi_node(fwnode), propname,
DEV_PROP_STRING, val, 1);
return -ENXIO;
return pset_prop_read_array(to_pset(fwnode), propname,
DEV_PROP_STRING, val, 1);
}
EXPORT_SYMBOL_GPL(fwnode_property_read_string);