summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2017-09-19 11:39:11 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-11-09 00:17:22 +0100
commitcf89a31ca55272e1dfb9527b5a61eee4d417747a (patch)
tree7888feac76cd19e3a31890a1473927d915133e8e /drivers/of
parentLinux 4.14-rc8 (diff)
downloadlinux-cf89a31ca55272e1dfb9527b5a61eee4d417747a.tar.xz
linux-cf89a31ca55272e1dfb9527b5a61eee4d417747a.zip
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 <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/property.c4
1 files changed, 2 insertions, 2 deletions
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)