backport: add firmware_request_nowarn and firmware_request_cache
authorFelix Fietkau <nbd@nbd.name>
Thu, 6 Sep 2018 06:57:50 +0000 (08:57 +0200)
committerJohn Crispin <john@phrozen.org>
Thu, 6 Sep 2018 16:57:26 +0000 (18:57 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
backport/backport-include/linux/firmware.h

index 186eec3e41aff720d6b2f8658dadd3ee759fb300..b5bc16befb85dca552e87994db64583a1279cd46 100644 (file)
@@ -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 */