diff options
author | Tobias Doerffel <tobias.doerffel@gmail.com> | 2010-05-29 18:02:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-04 15:50:52 -0400 |
commit | e307139d7ad532761cdbf2a665f3c53c509a2d0e (patch) | |
tree | 72165d2916700793d555666473ed01b79b6d9959 /drivers/net | |
parent | 8b9a4e6e442756f670ef507f09bbc6c11dc0fca6 (diff) |
ath5k: depend on CONFIG_PM_SLEEP for suspend/resume functions
When building a kernel with CONFIG_PM=y but neither suspend nor
hibernate support, the compiler complains about the static functions
ath5k_pci_suspend() and ath5k_pci_resume() not being used:
drivers/net/wireless/ath/ath5k/base.c:713:12: warning: ‘ath5k_pci_suspend’ defined but not used
drivers/net/wireless/ath/ath5k/base.c:722:12: warning: ‘ath5k_pci_resume’ defined but not used
Depending on CONFIG_PM_SLEEP rather than CONFIG_PM fixes the issue.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 2978359c4366..53d95c83b11a 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -195,7 +195,7 @@ static const struct ieee80211_rate ath5k_rates[] = { | |||
195 | static int __devinit ath5k_pci_probe(struct pci_dev *pdev, | 195 | static int __devinit ath5k_pci_probe(struct pci_dev *pdev, |
196 | const struct pci_device_id *id); | 196 | const struct pci_device_id *id); |
197 | static void __devexit ath5k_pci_remove(struct pci_dev *pdev); | 197 | static void __devexit ath5k_pci_remove(struct pci_dev *pdev); |
198 | #ifdef CONFIG_PM | 198 | #ifdef CONFIG_PM_SLEEP |
199 | static int ath5k_pci_suspend(struct device *dev); | 199 | static int ath5k_pci_suspend(struct device *dev); |
200 | static int ath5k_pci_resume(struct device *dev); | 200 | static int ath5k_pci_resume(struct device *dev); |
201 | 201 | ||
@@ -203,7 +203,7 @@ static SIMPLE_DEV_PM_OPS(ath5k_pm_ops, ath5k_pci_suspend, ath5k_pci_resume); | |||
203 | #define ATH5K_PM_OPS (&ath5k_pm_ops) | 203 | #define ATH5K_PM_OPS (&ath5k_pm_ops) |
204 | #else | 204 | #else |
205 | #define ATH5K_PM_OPS NULL | 205 | #define ATH5K_PM_OPS NULL |
206 | #endif /* CONFIG_PM */ | 206 | #endif /* CONFIG_PM_SLEEP */ |
207 | 207 | ||
208 | static struct pci_driver ath5k_pci_driver = { | 208 | static struct pci_driver ath5k_pci_driver = { |
209 | .name = KBUILD_MODNAME, | 209 | .name = KBUILD_MODNAME, |
@@ -708,7 +708,7 @@ ath5k_pci_remove(struct pci_dev *pdev) | |||
708 | ieee80211_free_hw(hw); | 708 | ieee80211_free_hw(hw); |
709 | } | 709 | } |
710 | 710 | ||
711 | #ifdef CONFIG_PM | 711 | #ifdef CONFIG_PM_SLEEP |
712 | static int ath5k_pci_suspend(struct device *dev) | 712 | static int ath5k_pci_suspend(struct device *dev) |
713 | { | 713 | { |
714 | struct ieee80211_hw *hw = pci_get_drvdata(to_pci_dev(dev)); | 714 | struct ieee80211_hw *hw = pci_get_drvdata(to_pci_dev(dev)); |
@@ -734,7 +734,7 @@ static int ath5k_pci_resume(struct device *dev) | |||
734 | ath5k_led_enable(sc); | 734 | ath5k_led_enable(sc); |
735 | return 0; | 735 | return 0; |
736 | } | 736 | } |
737 | #endif /* CONFIG_PM */ | 737 | #endif /* CONFIG_PM_SLEEP */ |
738 | 738 | ||
739 | 739 | ||
740 | /***********************\ | 740 | /***********************\ |