* [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
* Re: [PATCH] Driver core: Add accessor for device tree node
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
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2013-07-30 13:57 UTC (permalink / raw)
To: Jingoo Han
Cc: linux-kernel, devicetree, Grant Likely, Rob Herring, Mark Brown,
Andrew Morton
On Tue, Jul 30, 2013 at 06:20:47PM +0900, Jingoo Han wrote:
> Add the wrapper function for retrieving device tree node instead of
> accessing dev->of_node directly.
Why?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Driver core: Add accessor for device tree node
2013-07-30 13:57 ` Greg Kroah-Hartman
@ 2013-07-31 0:47 ` Jingoo Han
0 siblings, 0 replies; 3+ messages in thread
From: Jingoo Han @ 2013-07-31 0:47 UTC (permalink / raw)
To: 'Greg Kroah-Hartman'
Cc: linux-kernel, devicetree, 'Grant Likely',
'Rob Herring', 'Mark Brown',
'Andrew Morton', Jingoo Han
On Tuesday, July 30, 2013 10:57 PM, Greg Kroah-Hartman wrote:
> On Tue, Jul 30, 2013 at 06:20:47PM +0900, Jingoo Han wrote:
> > Add the wrapper function for retrieving device tree node instead of
> > accessing dev->of_node directly.
>
> Why?
Sorry, I cannot find the special reason why it should be used.
Please, ignore it. :)
Thanks.
Best regards,
Jingoo Han
^ permalink raw reply [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).