diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-11-29 17:27:16 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-30 14:00:36 -0500 |
commit | 88823492736a43f04d2ee114e0ec2b7725d3be35 (patch) | |
tree | 83f0110ac818b934ff32cf358b5dcd49983f395a /drivers | |
parent | 88427588993db079a1b2cdbcba69f3c162f8ee21 (diff) |
p54pci: use SIMPLE_DEV_PM_OPS
p54pci 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/p54/p54pci.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c index b4390797d78c..810c343e4e30 100644 --- a/drivers/net/wireless/p54/p54pci.c +++ b/drivers/net/wireless/p54/p54pci.c | |||
@@ -659,7 +659,7 @@ static void __devexit p54p_remove(struct pci_dev *pdev) | |||
659 | p54_free_common(dev); | 659 | p54_free_common(dev); |
660 | } | 660 | } |
661 | 661 | ||
662 | #ifdef CONFIG_PM | 662 | #ifdef CONFIG_PM_SLEEP |
663 | static int p54p_suspend(struct device *device) | 663 | static int p54p_suspend(struct device *device) |
664 | { | 664 | { |
665 | struct pci_dev *pdev = to_pci_dev(device); | 665 | struct pci_dev *pdev = to_pci_dev(device); |
@@ -681,19 +681,12 @@ static int p54p_resume(struct device *device) | |||
681 | return pci_set_power_state(pdev, PCI_D0); | 681 | return pci_set_power_state(pdev, PCI_D0); |
682 | } | 682 | } |
683 | 683 | ||
684 | static const struct dev_pm_ops p54pci_pm_ops = { | 684 | static SIMPLE_DEV_PM_OPS(p54pci_pm_ops, p54p_suspend, p54p_resume); |
685 | .suspend = p54p_suspend, | ||
686 | .resume = p54p_resume, | ||
687 | .freeze = p54p_suspend, | ||
688 | .thaw = p54p_resume, | ||
689 | .poweroff = p54p_suspend, | ||
690 | .restore = p54p_resume, | ||
691 | }; | ||
692 | 685 | ||
693 | #define P54P_PM_OPS (&p54pci_pm_ops) | 686 | #define P54P_PM_OPS (&p54pci_pm_ops) |
694 | #else | 687 | #else |
695 | #define P54P_PM_OPS (NULL) | 688 | #define P54P_PM_OPS (NULL) |
696 | #endif /* CONFIG_PM */ | 689 | #endif /* CONFIG_PM_SLEEP */ |
697 | 690 | ||
698 | static struct pci_driver p54p_driver = { | 691 | static struct pci_driver p54p_driver = { |
699 | .name = "p54pci", | 692 | .name = "p54pci", |