mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 14:30:06 -04:00
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
This commit is contained in:
@@ -99,6 +99,10 @@ struct fwnode_operations {
|
||||
(fwnode ? (fwnode_has_op(fwnode, op) ? \
|
||||
(fwnode)->ops->op(fwnode, ## __VA_ARGS__) : -ENXIO) : \
|
||||
-EINVAL)
|
||||
#define fwnode_call_bool_op(fwnode, op, ...) \
|
||||
(fwnode ? (fwnode_has_op(fwnode, op) ? \
|
||||
(fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false) : \
|
||||
false)
|
||||
#define fwnode_call_ptr_op(fwnode, op, ...) \
|
||||
(fwnode_has_op(fwnode, op) ? \
|
||||
(fwnode)->ops->op(fwnode, ## __VA_ARGS__) : NULL)
|
||||
|
||||
Reference in New Issue
Block a user