From 87d308708712ff6075c4dd54b0519b47fdad8816 Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Thu, 26 Mar 2020 12:44:27 +0200 Subject: Backports v5.4.27 Backports generated by toradex backports f6e8852f1ef28e6d3c9bae8400eb6a87a6b0c3e7 against mainline kernel tag v5.4.27 Signed-off-by: Oleksandr Suvorov --- backport-include/linux/of_platform.h | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 backport-include/linux/of_platform.h (limited to 'backport-include/linux/of_platform.h') diff --git a/backport-include/linux/of_platform.h b/backport-include/linux/of_platform.h new file mode 100644 index 0000000..625ee9e --- /dev/null +++ b/backport-include/linux/of_platform.h @@ -0,0 +1,38 @@ +#ifndef __BACKPORT_LINUX_OF_PLATFORM_H +#define __BACKPORT_LINUX_OF_PLATFORM_H +#include_next +#include +#include +/* upstream now includes this here and some people rely on it */ +#include + +#if LINUX_VERSION_IS_LESS(3,4,0) && !defined(CONFIG_OF_DEVICE) +struct of_dev_auxdata; +#define of_platform_populate LINUX_BACKPORT(of_platform_populate) +static inline int of_platform_populate(struct device_node *root, + const struct of_device_id *matches, + const struct of_dev_auxdata *lookup, + struct device *parent) +{ + return -ENODEV; +} +#endif /* LINUX_VERSION_IS_LESS(3,4,0) */ + +#if LINUX_VERSION_IS_LESS(3,11,0) && !defined(CONFIG_OF_DEVICE) +extern const struct of_device_id of_default_bus_match_table[]; +#endif /* LINUX_VERSION_IS_LESS(3,11,0) */ + +#if LINUX_VERSION_IS_LESS(4,3,0) && !defined(CONFIG_OF_DEVICE) +struct of_dev_auxdata; +#define of_platform_default_populate \ + LINUX_BACKPORT(of_platform_default_populate) +static inline int +of_platform_default_populate(struct device_node *root, + const struct of_dev_auxdata *lookup, + struct device *parent) +{ + return -ENODEV; +} +#endif /* LINUX_VERSION_IS_LESS(4,3,0) */ + +#endif /* __BACKPORT_LINUX_OF_PLATFORM_H */ -- cgit v1.2.3