]> git.baikalelectronics.ru Git - kernel.git/commit
wlcore: fix unused function warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 11 Dec 2017 11:46:29 +0000 (12:46 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 14 Dec 2017 12:44:31 +0000 (14:44 +0200)
commite7e5ec7716295d45cad8d8f38c764436ea6a755b
tree2bddcca4599347d5623c545f0c6b7f33a90259d2
parentd83d89a42c3f84c537e93590556671d9bdc6a0db
wlcore: fix unused function warning

The newly added wlcore_fw_sleep function is called conditionally,
which causes a warning without CONFIG_PM:

drivers/net/wireless/ti/wlcore/main.c:981:12: error: 'wlcore_fw_sleep' defined but not used [-Werror=unused-function]

Instead of trying to keep track of what should be in the #ifdef and what
should not, it's easier to mark the top-level suspend/resume functions
as __maybe_unused so the compiler can silently drop all the unused code.

Fixes: d91768b4de89 ("wlcore: allow elp during wowlan suspend")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ti/wlcore/acx.h
drivers/net/wireless/ti/wlcore/main.c