Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firmware loader: fix compile warning with PM_SLEEP set

This patch fixes the below compile warning:

drivers/base/firmware_class.c:1254:12: warning: 'cache_firmware' defined
but not used [-Wunused-function]
static int cache_firmware(const char *fw_name)
^
drivers/base/firmware_class.c:1281:12: warning: 'uncache_firmware'
defined but not used [-Wunused-function]
static int uncache_firmware(const char *fw_name)
^

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ming Lei and committed by
Greg Kroah-Hartman
90f89081 7068cb07

+3 -3
+3 -3
drivers/base/firmware_class.c
··· 1247 1247 } 1248 1248 EXPORT_SYMBOL(request_firmware_nowait); 1249 1249 1250 + #ifdef CONFIG_PM_SLEEP 1251 + static ASYNC_DOMAIN_EXCLUSIVE(fw_cache_domain); 1252 + 1250 1253 /** 1251 1254 * cache_firmware - cache one firmware image in kernel memory space 1252 1255 * @fw_name: the firmware image name ··· 1309 1306 1310 1307 return -EINVAL; 1311 1308 } 1312 - 1313 - #ifdef CONFIG_PM_SLEEP 1314 - static ASYNC_DOMAIN_EXCLUSIVE(fw_cache_domain); 1315 1309 1316 1310 static struct fw_cache_entry *alloc_fw_cache_entry(const char *name) 1317 1311 {