From 85b9c4e29b11ef45cf81e1774b60a1b6e22efe2e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 14 Jun 2014 23:23:00 +0200 Subject: [PATCH] backports: add of_match_ptr() Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/of.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backport/backport-include/linux/of.h b/backport/backport-include/linux/of.h index 69664de75226..f2a8ab47e560 100644 --- a/backport/backport-include/linux/of.h +++ b/backport/backport-include/linux/of.h @@ -106,4 +106,12 @@ static inline void of_node_put(struct device_node *node) { } #endif /* CONFIG_OF */ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) */ +#ifndef of_match_ptr +#ifdef CONFIG_OF +#define of_match_ptr(_ptr) (_ptr) +#else +#define of_match_ptr(_ptr) NULL +#endif /* CONFIG_OF */ +#endif /* of_match_ptr */ + #endif /* _COMPAT_LINUX_OF_H */ -- 2.30.2