diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-14 22:39:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-14 22:39:35 -0700 |
commit | 96d0d831a50054bf3fb032fba4bc65006530e362 (patch) | |
tree | 16a25c55304475524ce668a1ea903884b902e9bc /drivers | |
parent | 1ef27400c52bf54b34261da49968343b6cb79e32 (diff) | |
parent | e8158b486d5f3f55cf372c5a32b42f263bf7f123 (diff) |
Merge tag 'devprop-fix-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull device properties framework fix from Rafael Wysocki:
"This fixes a problem with bool properties that could be seen as "true"
when the property was not present at all by adding a special helper
for bool properties with checks for all of the requisute conditions
(Sakari Ailus)"
* tag 'devprop-fix-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
device property: Introduce fwnode_call_bool_op() for ops that return bool
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/property.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c index 692007e5a94b..edf02c1b5845 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -253,10 +253,10 @@ bool fwnode_property_present(struct fwnode_handle *fwnode, const char *propname) { bool ret; - ret = fwnode_call_int_op(fwnode, property_present, propname); + ret = fwnode_call_bool_op(fwnode, property_present, propname); if (ret == false && !IS_ERR_OR_NULL(fwnode) && !IS_ERR_OR_NULL(fwnode->secondary)) - ret = fwnode_call_int_op(fwnode->secondary, property_present, + ret = fwnode_call_bool_op(fwnode->secondary, property_present, propname); return ret; } @@ -1027,7 +1027,7 @@ EXPORT_SYMBOL_GPL(fwnode_handle_put); */ bool fwnode_device_is_available(struct fwnode_handle *fwnode) { - return fwnode_call_int_op(fwnode, device_is_available); + return fwnode_call_bool_op(fwnode, device_is_available); } EXPORT_SYMBOL_GPL(fwnode_device_is_available); |