Commit 88427588 authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville

ath9k: use SIMPLE_DEV_PM_OPS

ath9k does not provide any runtime pm callbacks, so support for
PM_RUNTIME is not needed and we could go to PM_SLEEP.
This also makes it possible to use SIMPLE_DEV_PM_OPS instead of
manually filling struct dev_pm_ops.
Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent dac67975
...@@ -287,7 +287,7 @@ static void ath_pci_remove(struct pci_dev *pdev) ...@@ -287,7 +287,7 @@ static void ath_pci_remove(struct pci_dev *pdev)
pci_release_region(pdev, 0); pci_release_region(pdev, 0);
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP
static int ath_pci_suspend(struct device *device) static int ath_pci_suspend(struct device *device)
{ {
...@@ -333,22 +333,15 @@ static int ath_pci_resume(struct device *device) ...@@ -333,22 +333,15 @@ static int ath_pci_resume(struct device *device)
return 0; return 0;
} }
static const struct dev_pm_ops ath9k_pm_ops = { static SIMPLE_DEV_PM_OPS(ath9k_pm_ops, ath_pci_suspend, ath_pci_resume);
.suspend = ath_pci_suspend,
.resume = ath_pci_resume,
.freeze = ath_pci_suspend,
.thaw = ath_pci_resume,
.poweroff = ath_pci_suspend,
.restore = ath_pci_resume,
};
#define ATH9K_PM_OPS (&ath9k_pm_ops) #define ATH9K_PM_OPS (&ath9k_pm_ops)
#else /* !CONFIG_PM */ #else /* !CONFIG_PM_SLEEP */
#define ATH9K_PM_OPS NULL #define ATH9K_PM_OPS NULL
#endif /* !CONFIG_PM */ #endif /* !CONFIG_PM_SLEEP */
MODULE_DEVICE_TABLE(pci, ath_pci_id_table); MODULE_DEVICE_TABLE(pci, ath_pci_id_table);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment