lkml.org 
[lkml]   [2013]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Driver core: Add accessor for device tree node
Date
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



\
 
 \ /
  Last update: 2013-07-30 12:01    [W:1.507 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site