aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cs5535audio
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/cs5535audio')
-rw-r--r--sound/pci/cs5535audio/cs5535audio_pm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio_pm.c b/sound/pci/cs5535audio/cs5535audio_pm.c
index 9a4e84aa3e04..838708f6d45e 100644
--- a/sound/pci/cs5535audio/cs5535audio_pm.c
+++ b/sound/pci/cs5535audio/cs5535audio_pm.c
@@ -74,8 +74,11 @@ int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state)
74 /* save important regs, then disable aclink in hw */ 74 /* save important regs, then disable aclink in hw */
75 snd_cs5535audio_stop_hardware(cs5535au); 75 snd_cs5535audio_stop_hardware(cs5535au);
76 76
77 if (pci_save_state(pci)) {
78 printk(KERN_ERR "cs5535audio: pci_save_state failed!\n");
79 return -EIO;
80 }
77 pci_disable_device(pci); 81 pci_disable_device(pci);
78 pci_save_state(pci);
79 pci_set_power_state(pci, pci_choose_state(pci, state)); 82 pci_set_power_state(pci, pci_choose_state(pci, state));
80 return 0; 83 return 0;
81} 84}
@@ -89,7 +92,12 @@ int snd_cs5535audio_resume(struct pci_dev *pci)
89 int i; 92 int i;
90 93
91 pci_set_power_state(pci, PCI_D0); 94 pci_set_power_state(pci, PCI_D0);
92 pci_restore_state(pci); 95 if (pci_restore_state(pci) < 0) {
96 printk(KERN_ERR "cs5535audio: pci_restore_state failed, "
97 "disabling device\n");
98 snd_card_disconnect(card);
99 return -EIO;
100 }
93 if (pci_enable_device(pci) < 0) { 101 if (pci_enable_device(pci) < 0) {
94 printk(KERN_ERR "cs5535audio: pci_enable_device failed, " 102 printk(KERN_ERR "cs5535audio: pci_enable_device failed, "
95 "disabling device\n"); 103 "disabling device\n");