[PATCH 08/10] backports: add of_find_node_by_name() if !CONFIG_OF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/of.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/backport/backport-include/linux/of.h b/backport/backport-include/linux/of.h
index 93e91dd..ad852c1 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 */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux