diff mbox series

[6/6] backport: add firmware_request_nowarn and firmware_request_cache

Message ID 20180906065750.89673-6-nbd@nbd.name (mailing list archive)
State Accepted
Headers show
Series [1/6] backports: copy linux/overflow.h | expand

Commit Message

Felix Fietkau Sept. 6, 2018, 6:57 a.m. UTC
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 backport/backport-include/linux/firmware.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/backport/backport-include/linux/firmware.h b/backport/backport-include/linux/firmware.h
index 186eec3e..b5bc16be 100644
--- a/backport/backport-include/linux/firmware.h
+++ b/backport/backport-include/linux/firmware.h
@@ -5,5 +5,16 @@ 
 #if LINUX_VERSION_IS_LESS(3,14,0)
 #define request_firmware_direct(fw, name, device) request_firmware(fw, name, device)
 #endif
+#if LINUX_VERSION_IS_LESS(4,18,0)
+#define firmware_request_nowarn(fw, name, device) request_firmware(fw, name, device)
+#endif
+
+#if LINUX_VERSION_IS_LESS(4,17,0)
+#define firmware_request_cache LINUX_BACKPORT(firmware_request_cache)
+static inline int firmware_request_cache(struct device *device, const char *name)
+{
+	return 0;
+}
+#endif
 
 #endif /* __BACKPORT_LINUX_FIRMWARE_H */