Add a dummy definition of alt_pr_register() for build testing.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
v2: (1) Add missing #endif.
(2) Correct conditional compilation test for ALTERA_PR_IP_CORE
tristate configuration.
---
include/linux/fpga/altera-pr-ip-core.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/fpga/altera-pr-ip-core.h b/include/linux/fpga/altera-pr-ip-core.h
index a6b4c07858cc..f91b4cf918fb 100644
--- a/include/linux/fpga/altera-pr-ip-core.h
+++ b/include/linux/fpga/altera-pr-ip-core.h
@@ -11,7 +11,15 @@
#ifndef _ALT_PR_IP_CORE_H
#define _ALT_PR_IP_CORE_H
#include <linux/io.h>
+#include <asm/errno.h>
+#if IS_ENABLED(CONFIG_ALTERA_PR_IP_CORE)
int alt_pr_register(struct device *dev, void __iomem *reg_base);
+#else
+static inline int alt_pr_register(struct device *dev, void __iomem *reg_base)
+{
+ return -EOPNOTSUPP;
+}
+#endif
#endif /* _ALT_PR_IP_CORE_H */
--
2.51.0