From: Jingoo Han <jg1.han@samsung.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
Mark Brown <broonie@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jingoo Han <jg1.han@samsung.com>
Subject: [PATCH] Driver core: Add accessor for device tree node
Date: Tue, 30 Jul 2013 18:20:47 +0900 [thread overview]
Message-ID: <007601ce8d06$13dbb890$3b9329b0$@samsung.com> (raw)
Add the wrapper function for retrieving device tree node instead of
accessing dev->of_node directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
include/linux/device.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/device.h b/include/linux/device.h
index 22b546a..4faaa51 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -917,6 +917,11 @@ static inline void *dev_get_platdata(const struct device *dev)
return dev->platform_data;
}
+static inline void *dev_get_of_node(const struct device *dev)
+{
+ return dev->of_node;
+}
+
/*
* Manual binding of a device to driver. See drivers/base/bus.c
* for information on use.
--
1.7.10.4
next reply other threads:[~2013-07-30 9:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 9:20 Jingoo Han [this message]
2013-07-30 13:57 ` [PATCH] Driver core: Add accessor for device tree node Greg Kroah-Hartman
2013-07-31 0:47 ` Jingoo Han
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='007601ce8d06$13dbb890$3b9329b0$@samsung.com' \
--to=jg1.han@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.