summaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2017-10-04 14:04:01 -0500
committerRob Herring <robh@kernel.org>2017-10-16 13:37:38 -0500
commit0c3c234b95fa7f1dfa19e1456a47ebafc300dd6b (patch)
treebd88c75e9101be4897e70d8e990b400776c69638 /include/linux/of.h
parent4c2bb57400394e4ec631a42dcf637e925db6202e (diff)
downloadlinux-0-day-0c3c234b95fa7f1dfa19e1456a47ebafc300dd6b.tar.gz
linux-0-day-0c3c234b95fa7f1dfa19e1456a47ebafc300dd6b.tar.xz
of: wrap accesses to device_node kobject
In preparation to make kobject element in struct device_node optional, provide and use a macro to return the kobject pointer. The only user outside the DT core is the driver core. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 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 'include/linux/of.h')
-rw-r--r--include/linux/of.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 7eb94b7fbcf38..2d685e7694090 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -111,6 +111,8 @@ static inline void of_node_init(struct device_node *node)
node->fwnode.ops = &of_fwnode_ops;
}
+#define of_node_kobj(n) (&(n)->kobj)
+
/* true when node is initialized */
static inline int of_node_is_initialized(struct device_node *node)
{