From 5fd8ecd5b2d24a91f08f191735eaff88a67a9f0d Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 2 Aug 2015 19:17:28 +0200 Subject: header: add of_platform_populate() of_platform_populate() is not added when CONFIG_OF_DEVICE is not set on kernel < 3.4. The same is true for of_default_bus_match_table on kernel < 3.11. we do not need to provide a real implementation of of_default_bus_match_table because it will be accessed. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/of_platform.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 backport/backport-include/linux/of_platform.h diff --git a/backport/backport-include/linux/of_platform.h b/backport/backport-include/linux/of_platform.h new file mode 100644 index 00000000..7b0e9062 --- /dev/null +++ b/backport/backport-include/linux/of_platform.h @@ -0,0 +1,23 @@ +#ifndef __BACKPORT_LINUX_OF_PLATFORM_H +#define __BACKPORT_LINUX_OF_PLATFORM_H +#include_next +#include +#include + +#if LINUX_VERSION_CODE < KERNEL_VERSION(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_CODE < KERNEL_VERSION(3,4,0) */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) && !defined(CONFIG_OF_DEVICE) +extern const struct of_device_id of_default_bus_match_table[]; +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) */ + +#endif /* __BACKPORT_LINUX_OF_PLATFORM_H */ -- cgit v1.2.3