[PATCH 1/4] fpga: altera-pr-ip: Add dummy definitions of API functions

From: Ian Abbott

Date: Tue Nov 04 2025 - 10:47:00 EST


Add a dummy definition of alt_pr_register() for build testing.

Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
---
include/linux/fpga/altera-pr-ip-core.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/linux/fpga/altera-pr-ip-core.h b/include/linux/fpga/altera-pr-ip-core.h
index a6b4c07858cc..4a5aa9adaccc 100644
--- a/include/linux/fpga/altera-pr-ip-core.h
+++ b/include/linux/fpga/altera-pr-ip-core.h
@@ -11,7 +11,13 @@
#ifndef _ALT_PR_IP_CORE_H
#define _ALT_PR_IP_CORE_H
#include <linux/io.h>
+#include <asm/errno.h>

+#ifdef 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 /* _ALT_PR_IP_CORE_H */
--
2.51.0