diff options
Diffstat (limited to 'drivers/ssb/pcihost_wrapper.c')
-rw-r--r-- | drivers/ssb/pcihost_wrapper.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/ssb/pcihost_wrapper.c b/drivers/ssb/pcihost_wrapper.c index 82a10abef640..e82db4aaa050 100644 --- a/drivers/ssb/pcihost_wrapper.c +++ b/drivers/ssb/pcihost_wrapper.c | |||
@@ -18,6 +18,12 @@ | |||
18 | #ifdef CONFIG_PM | 18 | #ifdef CONFIG_PM |
19 | static int ssb_pcihost_suspend(struct pci_dev *dev, pm_message_t state) | 19 | static int ssb_pcihost_suspend(struct pci_dev *dev, pm_message_t state) |
20 | { | 20 | { |
21 | struct ssb_bus *ssb = pci_get_drvdata(dev); | ||
22 | int err; | ||
23 | |||
24 | err = ssb_bus_suspend(ssb); | ||
25 | if (err) | ||
26 | return err; | ||
21 | pci_save_state(dev); | 27 | pci_save_state(dev); |
22 | pci_disable_device(dev); | 28 | pci_disable_device(dev); |
23 | pci_set_power_state(dev, pci_choose_state(dev, state)); | 29 | pci_set_power_state(dev, pci_choose_state(dev, state)); |
@@ -27,6 +33,7 @@ static int ssb_pcihost_suspend(struct pci_dev *dev, pm_message_t state) | |||
27 | 33 | ||
28 | static int ssb_pcihost_resume(struct pci_dev *dev) | 34 | static int ssb_pcihost_resume(struct pci_dev *dev) |
29 | { | 35 | { |
36 | struct ssb_bus *ssb = pci_get_drvdata(dev); | ||
30 | int err; | 37 | int err; |
31 | 38 | ||
32 | pci_set_power_state(dev, 0); | 39 | pci_set_power_state(dev, 0); |
@@ -34,6 +41,9 @@ static int ssb_pcihost_resume(struct pci_dev *dev) | |||
34 | if (err) | 41 | if (err) |
35 | return err; | 42 | return err; |
36 | pci_restore_state(dev); | 43 | pci_restore_state(dev); |
44 | err = ssb_bus_resume(ssb); | ||
45 | if (err) | ||
46 | return err; | ||
37 | 47 | ||
38 | return 0; | 48 | return 0; |
39 | } | 49 | } |