From: Hauke Mehrtens Date: Wed, 7 Aug 2013 22:53:23 +0000 (+0200) Subject: backports: add of_find_node_by_name() if !CONFIG_OF X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5ad580451aa469ad1174e1b14b3e7f37df866752;p=openwrt%2Fstaging%2Fblogic.git backports: add of_find_node_by_name() if !CONFIG_OF The old kernel only exports this function when CONFIG_OF is set, but not when CONFIG_OF is not set. Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- diff --git a/backport/backport-include/linux/of.h b/backport/backport-include/linux/of.h index 93e91dd9a2bb..ad852c10f91e 100644 --- a/backport/backport-include/linux/of.h +++ b/backport/backport-include/linux/of.h @@ -28,6 +28,16 @@ static inline struct device_node *of_get_child_by_name( #endif /* CONFIG_OF */ #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)) */ +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)) +#ifndef CONFIG_OF +static inline struct device_node *of_find_node_by_name(struct device_node *from, + const char *name) +{ + return NULL; +} +#endif /* CONFIG_OF */ +#endif + #endif /* KERNEL_HAS_OF_SUPPORT */ #endif /* _COMPAT_LINUX_OF_H */