diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-11-29 17:27:15 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-30 14:00:35 -0500 |
commit | 88427588993db079a1b2cdbcba69f3c162f8ee21 (patch) | |
tree | 82764784120266c06c90056b28368ce4a0388e30 /drivers | |
parent | dac67975f3dc8565e4254b1d7a49618494f1a2f1 (diff) |
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: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 9553203ee62..8e9b826f878 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -287,7 +287,7 @@ static void ath_pci_remove(struct pci_dev *pdev) | |||
287 | pci_release_region(pdev, 0); | 287 | pci_release_region(pdev, 0); |
288 | } | 288 | } |
289 | 289 | ||
290 | #ifdef CONFIG_PM | 290 | #ifdef CONFIG_PM_SLEEP |
291 | 291 | ||
292 | static int ath_pci_suspend(struct device *device) | 292 | static int ath_pci_suspend(struct device *device) |
293 | { | 293 | { |
@@ -333,22 +333,15 @@ static int ath_pci_resume(struct device *device) | |||
333 | return 0; | 333 | return 0; |
334 | } | 334 | } |
335 | 335 | ||
336 | static const struct dev_pm_ops ath9k_pm_ops = { | 336 | static SIMPLE_DEV_PM_OPS(ath9k_pm_ops, ath_pci_suspend, ath_pci_resume); |
337 | .suspend = ath_pci_suspend, | ||
338 | .resume = ath_pci_resume, | ||
339 | .freeze = ath_pci_suspend, | ||
340 | .thaw = ath_pci_resume, | ||
341 | .poweroff = ath_pci_suspend, | ||
342 | .restore = ath_pci_resume, | ||
343 | }; | ||
344 | 337 | ||
345 | #define ATH9K_PM_OPS (&ath9k_pm_ops) | 338 | #define ATH9K_PM_OPS (&ath9k_pm_ops) |
346 | 339 | ||
347 | #else /* !CONFIG_PM */ | 340 | #else /* !CONFIG_PM_SLEEP */ |
348 | 341 | ||
349 | #define ATH9K_PM_OPS NULL | 342 | #define ATH9K_PM_OPS NULL |
350 | 343 | ||
351 | #endif /* !CONFIG_PM */ | 344 | #endif /* !CONFIG_PM_SLEEP */ |
352 | 345 | ||
353 | 346 | ||
354 | MODULE_DEVICE_TABLE(pci, ath_pci_id_table); | 347 | MODULE_DEVICE_TABLE(pci, ath_pci_id_table); |