[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251105123752.93672-2-abbotti@mev.co.uk>
Date: Wed, 5 Nov 2025 12:31:05 +0000
From: Ian Abbott <abbotti@....co.uk>
To: linux-fpga@...r.kernel.org
Cc: Moritz Fischer <mdf@...nel.org>,
Xu Yilun <yilun.xu@...el.com>,
Tom Rix <trix@...hat.com>,
linux-kernel@...r.kernel.org,
Ian Abbott <abbotti@....co.uk>
Subject: [PATCH v2 1/4] fpga: altera-pr-ip: Add dummy definitions of API functions
Add a dummy definition of alt_pr_register() for build testing.
Signed-off-by: Ian Abbott <abbotti@....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
Powered by blists - more mailing lists