[PATCH 02/20] headers: include linux/module.h from backport.h
Yi Cong <[email protected]> Wed, 24 Jun 2026 15:38:26 +0800
| Newsgroups | org.kernel.vger.backports |
|---|---|
| Message-ID | <[email protected]> |
From: Yi Cong <[email protected]> In v6.2, include/linux/device/driver.h includes linux/module.h, so files using module_param() get it transitively. In v5.4 there is no separate device/driver.h and the include chain does not reach module.h, causing implicit-declaration errors for module_param() and related macros. Include <linux/module.h> from backport.h, which is force-included via -include on every compilation unit, ensuring module_param and friends are always available. Signed-off-by: Yi Cong <[email protected]> --- backport/backport-include/backport/backport.h | 1 + 1 file changed, 1 insertion(+) diff --git a/backport/backport-include/backport/backport.h b/backport/backport-include/backport/backport.h index d1d3b102..be8668eb 100644 --- a/backport/backport-include/backport/backport.h +++ b/backport/backport-include/backport/backport.h @@ -8,6 +8,7 @@ #ifndef __ASSEMBLY__ #define LINUX_BACKPORT(__sym) backport_ ##__sym +#include <linux/module.h> #ifndef CONFIG_BACKPORT_INTEGRATE #include <backport/checks.h> #endif -- 2.43.0