diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/firmware_loader/Kconfig | 12 | ||||
-rw-r--r-- | drivers/base/firmware_loader/main.c | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/drivers/base/firmware_loader/Kconfig b/drivers/base/firmware_loader/Kconfig index 3f9e274e2ed3..33e6552ddbb6 100644 --- a/drivers/base/firmware_loader/Kconfig +++ b/drivers/base/firmware_loader/Kconfig @@ -169,5 +169,17 @@ config FW_LOADER_COMPRESS be compressed with either none or crc32 integrity check type (pass "-C crc32" option to xz command). +config FW_CACHE + bool "Enable firmware caching during suspend" + depends on PM_SLEEP + default y if PM_SLEEP + help + Because firmware caching generates uevent messages that are sent + over a netlink socket, it can prevent suspend on many platforms. + It is also not always useful, so on such platforms we have the + option. + + If unsure, say Y. + endif # FW_LOADER endmenu diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c index 7302e6bc419b..249add8c5e05 100644 --- a/drivers/base/firmware_loader/main.c +++ b/drivers/base/firmware_loader/main.c @@ -51,7 +51,7 @@ struct firmware_cache { struct list_head head; int state; -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_FW_CACHE /* * Names of firmware images which have been cached successfully * will be added into the below list so that device uncache @@ -557,7 +557,7 @@ static void fw_set_page_data(struct fw_priv *fw_priv, struct firmware *fw) (unsigned int)fw_priv->size); } -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_FW_CACHE static void fw_name_devm_release(struct device *dev, void *res) { struct fw_name_devm *fwn = res; @@ -1047,7 +1047,7 @@ request_firmware_nowait( } EXPORT_SYMBOL(request_firmware_nowait); -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_FW_CACHE static ASYNC_DOMAIN_EXCLUSIVE(fw_cache_domain); /** |