[PATCH 64/75] header: Add module.h include to firmware.h

Hauke Mehrtens <[email protected]> Fri, 28 Jun 2024 01:47:50 +0200
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
Many drivers do not include linux/module.h directly, but use definitions
from it. They include the firmware.h

In later kernel versions this additional include is already done by the
kernel.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
 backport/backport-include/linux/firmware.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/backport/backport-include/linux/firmware.h b/backport/backport-include/linux/firmware.h
index 9bfe6e9d..36d0702a 100644
--- a/backport/backport-include/linux/firmware.h
+++ b/backport/backport-include/linux/firmware.h
@@ -2,6 +2,10 @@
 #define __BACKPORT_LINUX_FIRMWARE_H
 #include_next <linux/firmware.h>
 
+#if LINUX_VERSION_IS_LESS(5,6,0)
+#include <linux/module.h>
+#endif
+
 #if LINUX_VERSION_IS_LESS(4,18,0)
 #define firmware_request_nowarn(fw, name, device) request_firmware(fw, name, device)
 #endif
-- 
2.45.2