]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: brcmfmac: Remove #ifdef guards for PM related functions
authorPaul Cercueil <paul@crapouillou.net>
Mon, 27 Jun 2022 19:37:01 +0000 (20:37 +0100)
committerKalle Valo <kvalo@kernel.org>
Thu, 28 Jul 2022 09:57:29 +0000 (12:57 +0300)
commit54e7be5692d3c1289fad2d59e1baa43b0da32157
tree03f881fa71bffe2ac6fd8efb725da45351c6ffc6
parente867905d570fa87a3572544a4bf428a8c82ee233
wifi: brcmfmac: Remove #ifdef guards for PM related functions

Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to
handle the .suspend/.resume callbacks.

These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards.

Some other functions not directly called by the .suspend/.resume
callbacks, but still related to PM were also taken outside #ifdef
guards.

The advantage is then that these functions are now always compiled
independently of any Kconfig option, and thanks to that bugs and
regressions are easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220627193701.31074-1-paul@crapouillou.net
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h