OSDN Git Service

ath10k: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Wed, 6 Sep 2017 12:58:53 +0000 (14:58 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 21 Sep 2017 15:01:30 +0000 (18:01 +0300)
commit6af1de2e4ec49635905aaed31d073a0d92c8d3bf
tree08dcb2b02d6c106398fb71c25a9e0156ce68771a
parent4c707c04f622a7a8570a8db6389e5a2310b92195
ath10k: mark PM functions as __maybe_unused

When CONFIG_PM_SLEEP is disabled, we get a compile-time
warning:

drivers/net/wireless/ath/ath10k/pci.c:3417:12: error: 'ath10k_pci_pm_resume' defined but not used [-Werror=unused-function]
 static int ath10k_pci_pm_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath10k/pci.c:3401:12: error: 'ath10k_pci_pm_suspend' defined but not used [-Werror=unused-function]
 static int ath10k_pci_pm_suspend(struct device *dev)

Rather than fixing the #ifdef, this just marks both functions
as __maybe_unused, which is a more robust way to do this.

Fixes: 32faa3f0ee50 ("ath10k: add the PCI PM core suspend/resume ops")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/pci.c