of: move kobj_to_device_node() into dynamic.c
authorRob Herring <robh@kernel.org>
Thu, 5 Oct 2017 00:30:53 +0000 (19:30 -0500)
committerRob Herring <robh@kernel.org>
Mon, 16 Oct 2017 18:37:37 +0000 (13:37 -0500)
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>
drivers/of/dynamic.c
drivers/of/of_private.h

index 301b6db..9d6ba18 100644 (file)
 
 #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
index 3ae12ff..cc86a97 100644 (file)
@@ -35,12 +35,6 @@ extern struct mutex of_mutex;
 extern struct list_head aliases_lookup;
 extern struct kset *of_kset;
 
-
-static inline struct device_node *kobj_to_device_node(struct kobject *kobj)
-{
-       return container_of(kobj, struct device_node, kobj);
-}
-
 #if defined(CONFIG_OF_DYNAMIC)
 extern int of_property_notify(int action, struct device_node *np,
                              struct property *prop, struct property *old_prop);