Add the wrapper function for retrieving device tree node instead of accessing dev->of_node directly.
Signed-off-by: Jingoo Han <[email protected]> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

