mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge branch 'device-properties'
* device-properties: device property: check fwnode type in to_of_node() device property: attach 'else if' to the proper 'if' device property: fallback to pset when gettng one string device property: fix potential NULL pointer dereference
This commit is contained in:
commit
498012511a
3 changed files with 10 additions and 6 deletions
|
|
@ -27,9 +27,10 @@
|
|||
*/
|
||||
void device_add_property_set(struct device *dev, struct property_set *pset)
|
||||
{
|
||||
if (pset)
|
||||
pset->fwnode.type = FWNODE_PDATA;
|
||||
if (!pset)
|
||||
return;
|
||||
|
||||
pset->fwnode.type = FWNODE_PDATA;
|
||||
set_secondary_fwnode(dev, &pset->fwnode);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(device_add_property_set);
|
||||
|
|
@ -461,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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue