diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 23:36:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 23:36:37 -0500 |
commit | 3c073991eb417b6f785ddc6afbbdc369eb84aa6a (patch) | |
tree | 0c1f3f2d919b5c9f096cdd2d4094a998df8537ef /drivers/base | |
parent | 04ed510988f278a69872b4cdb426e565e3236215 (diff) | |
parent | 5e4b1b707b7ed795585b8ee28c44ce692aa8dfef (diff) |
Merge tag 'devprop-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull device properties framework updates from Rafael Wysocki:
"These make the fwnode_handle_get() function return a pointer to the
target fwnode object, which reflects the of_node_get() behavior, and
add a macro for iterating over graph endpoints (Sakari Ailus)"
* tag 'devprop-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
device property: Add a macro for interating over graph endpoints
device property: Make fwnode_handle_get() return the fwnode
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/property.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c index 7ed99c1b2a8b..851b1b6596a4 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c | |||
@@ -1044,10 +1044,15 @@ EXPORT_SYMBOL_GPL(device_get_named_child_node); | |||
1044 | /** | 1044 | /** |
1045 | * fwnode_handle_get - Obtain a reference to a device node | 1045 | * fwnode_handle_get - Obtain a reference to a device node |
1046 | * @fwnode: Pointer to the device node to obtain the reference to. | 1046 | * @fwnode: Pointer to the device node to obtain the reference to. |
1047 | * | ||
1048 | * Returns the fwnode handle. | ||
1047 | */ | 1049 | */ |
1048 | void fwnode_handle_get(struct fwnode_handle *fwnode) | 1050 | struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode) |
1049 | { | 1051 | { |
1050 | fwnode_call_void_op(fwnode, get); | 1052 | if (!fwnode_has_op(fwnode, get)) |
1053 | return fwnode; | ||
1054 | |||
1055 | return fwnode_call_ptr_op(fwnode, get); | ||
1051 | } | 1056 | } |
1052 | EXPORT_SYMBOL_GPL(fwnode_handle_get); | 1057 | EXPORT_SYMBOL_GPL(fwnode_handle_get); |
1053 | 1058 | ||