diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/firmware.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index 25109192cebe..d743a8d1c2fe 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h @@ -20,12 +20,19 @@ struct firmware { struct module; struct device; +/* + * Built-in firmware functionality is only available if FW_LOADER=y, but not + * FW_LOADER=m + */ +#ifdef CONFIG_FW_LOADER struct builtin_fw { char *name; void *data; unsigned long size; }; +bool firmware_request_builtin(struct firmware *fw, const char *name); + /* We have to play tricks here much like stringify() to get the __COUNTER__ macro to be expanded as we want it */ #define __fw_concat1(x, y) x##y @@ -38,6 +45,14 @@ struct builtin_fw { static const struct builtin_fw __fw_concat(__builtin_fw,__COUNTER__) \ __used __section(".builtin_fw") = { name, blob, size } +#else +static inline bool firmware_request_builtin(struct firmware *fw, + const char *name) +{ + return false; +} +#endif + #if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE)) int request_firmware(const struct firmware **fw, const char *name, struct device *device); |