Skip to content

Commit

Permalink
device property: fallback to pset when gettng one string
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Rafael J. Wysocki committed Aug 25, 2015
1 parent ecc87ee commit 4f73b06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/base/property.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4f73b06

Please sign in to comment.