devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: Nicolas Pitre <nico@linaro.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Grant Likely <glikely@secretlab.ca>
Subject: [PATCH 4/6] of: move kobj_to_device_node() into dynamic.c
Date: Thu,  5 Oct 2017 14:44:20 -0500	[thread overview]
Message-ID: <20171005194422.26224-5-robh@kernel.org> (raw)
In-Reply-To: <20171005194422.26224-1-robh@kernel.org>

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.

Cc: Nicolas Pitre <nico@linaro.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/of/dynamic.c    | 5 +++++
 drivers/of/of_private.h | 6 ------
 2 files changed, 5 insertions(+), 6 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
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index 3ae12ffbf547..cc86a974f35f 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -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);
-- 
2.11.0

  parent reply	other threads:[~2017-10-05 19:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 19:44 [PATCH 0/6] Shrinking DT memory usage Rob Herring
     [not found] ` <20171005194422.26224-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-10-05 19:44   ` [PATCH 1/6] of: fix missing kobject init for !SYSFS && OF_DYNAMIC config Rob Herring
2017-10-07  2:11   ` [PATCH 0/6] Shrinking DT memory usage Frank Rowand
2017-10-05 19:44 ` [PATCH 2/6] of: remove struct property.unique_id for FDT Rob Herring
2017-10-06 13:30   ` Grant Likely
2017-10-05 19:44 ` [PATCH 3/6] of: make struct property _flags field configurable Rob Herring
2017-10-05 19:44 ` Rob Herring [this message]
2017-10-05 19:44 ` [PATCH 5/6] of: wrap accesses to device_node kobject Rob Herring
     [not found]   ` <20171005194422.26224-6-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-10-06 10:09     ` Greg Kroah-Hartman
2017-10-05 19:44 ` [PATCH 6/6] of: make kobject and bin_attribute support configurable Rob Herring
2017-10-06 13:55 ` [PATCH 0/6] Shrinking DT memory usage Grant Likely
2017-10-06 21:30 ` Nicolas Pitre
     [not found]   ` <nycvar.YSQ.7.76.1710061726330.1834-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2017-10-06 22:10     ` Rob Herring
     [not found]       ` <CAL_JsqLDhf2tx5PHAnY9X3ju42BayVmJ1KONoKFhhbSaxaKGHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-06 23:24         ` Nicolas Pitre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171005194422.26224-5-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=glikely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).