[PATCH 1/2] iommufd: import IOMMUFD_INTERNAL namespace

From: Arnd Bergmann
Date: Mon Mar 24 2025 - 17:10:29 EST


From: Arnd Bergmann <arnd@xxxxxxxx>

Building the iommufd driver as a loadable module causes a failure now:

ERROR: modpost: module iommufd_driver uses symbol iommu_attach_handle_get from namespace IOMMUFD_INTERNAL, but does not import it.

Import the namespace as needed here.

Fixes: 916a207692ce ("iommufd: Move iommufd_sw_msi and related functions to driver.c")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
drivers/iommu/iommufd/driver.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/iommufd/driver.c b/drivers/iommu/iommufd/driver.c
index 352513974154..a08ff0f37fc6 100644
--- a/drivers/iommu/iommufd/driver.c
+++ b/drivers/iommu/iommufd/driver.c
@@ -247,4 +247,5 @@ EXPORT_SYMBOL_NS_GPL(iommufd_sw_msi, "IOMMUFD");
#endif

MODULE_DESCRIPTION("iommufd code shared with builtin modules");
+MODULE_IMPORT_NS("IOMMUFD_INTERNAL");
MODULE_LICENSE("GPL");
--
2.39.5