devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Driver core: Add accessor for device tree node
@ 2013-07-30  9:20 Jingoo Han
  2013-07-30 13:57 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Jingoo Han @ 2013-07-30  9:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devicetree, Grant Likely, Rob Herring, Mark Brown,
	Andrew Morton, Jingoo Han

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-31  0:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30  9:20 [PATCH] Driver core: Add accessor for device tree node Jingoo Han
2013-07-30 13:57 ` Greg Kroah-Hartman
2013-07-31  0:47   ` Jingoo Han

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).