1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __FIRMWARE_FALLBACK_H
3 #define __FIRMWARE_FALLBACK_H
5 #include <linux/firmware.h>
6 #include <linux/device.h>
11 #ifdef CONFIG_FW_LOADER_USER_HELPER
12 int firmware_fallback_sysfs(struct firmware
*fw
, const char *name
,
13 struct device
*device
,
16 void kill_pending_fw_fallback_reqs(bool kill_all
);
18 void fw_fallback_set_cache_timeout(void);
19 void fw_fallback_set_default_timeout(void);
21 #else /* CONFIG_FW_LOADER_USER_HELPER */
22 static inline int firmware_fallback_sysfs(struct firmware
*fw
, const char *name
,
23 struct device
*device
,
27 /* Keep carrying over the same error */
31 static inline void kill_pending_fw_fallback_reqs(bool kill_all
) { }
32 static inline void fw_fallback_set_cache_timeout(void) { }
33 static inline void fw_fallback_set_default_timeout(void) { }
34 #endif /* CONFIG_FW_LOADER_USER_HELPER */
36 #ifdef CONFIG_EFI_EMBEDDED_FIRMWARE
37 int firmware_fallback_platform(struct fw_priv
*fw_priv
);
39 static inline int firmware_fallback_platform(struct fw_priv
*fw_priv
)
45 #endif /* __FIRMWARE_FALLBACK_H */