From cf89a31ca55272e1dfb9527b5a61eee4d417747a Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Tue, 19 Sep 2017 12:39:11 +0300 Subject: device property: Make fwnode_handle_get() return the fwnode The fwnode_handle_get() function is used to obtain a reference to an fwnode. A common usage pattern for the OF equivalent of the function is: mynode = of_node_get(node); Similarly make fwnode_handle_get() return the fwnode to which the reference was obtained. Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki --- drivers/of/property.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/of') diff --git a/drivers/of/property.c b/drivers/of/property.c index 264c355ba1ff..8ad33a44a7b8 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -817,9 +817,9 @@ struct device_node *of_graph_get_remote_node(const struct device_node *node, } EXPORT_SYMBOL(of_graph_get_remote_node); -static void of_fwnode_get(struct fwnode_handle *fwnode) +static struct fwnode_handle *of_fwnode_get(struct fwnode_handle *fwnode) { - of_node_get(to_of_node(fwnode)); + return of_fwnode_handle(of_node_get(to_of_node(fwnode))); } static void of_fwnode_put(struct fwnode_handle *fwnode) -- cgit