diff options
author | Rob Herring | 2017-10-04 19:30:53 -0500 |
---|---|---|
committer | Rob Herring | 2017-10-16 13:37:37 -0500 |
commit | 4c2bb57400394e4ec631a42dcf637e925db6202e (patch) | |
tree | 3462331eb27a63fc40a0df60335f983e8c0ca6c8 /drivers/of/dynamic.c | |
parent | 16bba30eab137aaa37538349c0a7496720e90c66 (diff) |
of: move kobj_to_device_node() into dynamic.c
The only user of kobj_to_device_node() is in dynamic.c, so move it
there. This avoids having to make it conditional once kobject is
configurable.
Tested-by: Nicolas Pitre <nico@linaro.org>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/dynamic.c')
-rw-r--r-- | drivers/of/dynamic.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index 301b6db2b48d..9d6ba18c529f 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -16,6 +16,11 @@ #include "of_private.h" +static struct device_node *kobj_to_device_node(struct kobject *kobj) +{ + return container_of(kobj, struct device_node, kobj); +} + /** * of_node_get() - Increment refcount of a node * @node: Node to inc refcount, NULL is supported to simplify writing of |