Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e307139d authored by Tobias Doerffel's avatar Tobias Doerffel Committed by John W. Linville
Browse files

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: default avatarTobias Doerffel <tobias.doerffel@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8b9a4e6e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ static const struct ieee80211_rate ath5k_rates[] = {
static int __devinit	ath5k_pci_probe(struct pci_dev *pdev,
				const struct pci_device_id *id);
static void __devexit	ath5k_pci_remove(struct pci_dev *pdev);
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int		ath5k_pci_suspend(struct device *dev);
static int		ath5k_pci_resume(struct device *dev);

@@ -203,7 +203,7 @@ static SIMPLE_DEV_PM_OPS(ath5k_pm_ops, ath5k_pci_suspend, ath5k_pci_resume);
#define ATH5K_PM_OPS	(&ath5k_pm_ops)
#else
#define ATH5K_PM_OPS	NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static struct pci_driver ath5k_pci_driver = {
	.name		= KBUILD_MODNAME,
@@ -708,7 +708,7 @@ ath5k_pci_remove(struct pci_dev *pdev)
	ieee80211_free_hw(hw);
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int ath5k_pci_suspend(struct device *dev)
{
	struct ieee80211_hw *hw = pci_get_drvdata(to_pci_dev(dev));
@@ -734,7 +734,7 @@ static int ath5k_pci_resume(struct device *dev)
	ath5k_led_enable(sc);
	return 0;
}
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */


/***********************\