]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit02a186f1e96bfca8fd19862dad14ea011712ce9d
tree03f881fa71bffe2ac6fd8efb725da45351c6ffc6
parentbef11f1edc40cee156c60f9dbbbd9725a56b3639
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