1 From: Brian Norris <briannorris@chromium.org>
2 Date: Thu, 19 Oct 2017 11:45:19 -0700
3 Subject: [PATCH] ath10k: fix build errors with !CONFIG_PM
5 Build errors have been reported with CONFIG_PM=n:
7 drivers/net/wireless/ath/ath10k/pci.c:3416:8: error: implicit
8 declaration of function 'ath10k_pci_suspend'
9 [-Werror=implicit-function-declaration]
11 drivers/net/wireless/ath/ath10k/pci.c:3428:8: error: implicit
12 declaration of function 'ath10k_pci_resume'
13 [-Werror=implicit-function-declaration]
15 These are caused by the combination of the following two commits:
17 6af1de2e4ec4 ("ath10k: mark PM functions as __maybe_unused")
18 96378bd2c6cd ("ath10k: fix core PCI suspend when WoWLAN is supported but
21 Both build fine on their own.
23 But now that ath10k_pci_pm_{suspend,resume}() is compiled
24 unconditionally, we should also compile ath10k_pci_{suspend,resume}()
27 And drop the #ifdef around ath10k_pci_hif_{suspend,resume}() too; they
28 are trivial (empty), so we're not saving much space by compiling them
29 out. And the alternatives would be to sprinkle more __maybe_unused, or
30 spread the #ifdef's further.
32 Build tested with the following combinations:
33 CONFIG_PM=y && CONFIG_PM_SLEEP=y
34 CONFIG_PM=y && CONFIG_PM_SLEEP=n
37 Fixes: 96378bd2c6cd ("ath10k: fix core PCI suspend when WoWLAN is supported but disabled")
38 Fixes: 096ad2a15fd8 ("Merge branch 'ath-next'")
39 Signed-off-by: Brian Norris <briannorris@chromium.org>
40 Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
43 --- a/drivers/net/wireless/ath/ath10k/pci.c
44 +++ b/drivers/net/wireless/ath/ath10k/pci.c
45 @@ -2577,8 +2577,6 @@ void ath10k_pci_hif_power_down(struct at
51 static int ath10k_pci_hif_suspend(struct ath10k *ar)
53 /* Nothing to do; the important stuff is in the driver suspend. */
54 @@ -2627,7 +2625,6 @@ static int ath10k_pci_resume(struct ath1
60 static bool ath10k_pci_validate_cal(void *data, size_t size)
62 @@ -2782,10 +2779,8 @@ static const struct ath10k_hif_ops ath10
63 .power_down = ath10k_pci_hif_power_down,
64 .read32 = ath10k_pci_read32,
65 .write32 = ath10k_pci_write32,
67 .suspend = ath10k_pci_hif_suspend,
68 .resume = ath10k_pci_hif_resume,
70 .fetch_cal_eeprom = ath10k_pci_hif_fetch_cal_eeprom,