diff options
Diffstat (limited to 'sound/pci/emu10k1/emu10k1.c')
| -rw-r--r-- | sound/pci/emu10k1/emu10k1.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c index b7c1875ba90e..8c5010f7889c 100644 --- a/sound/pci/emu10k1/emu10k1.c +++ b/sound/pci/emu10k1/emu10k1.c | |||
| @@ -99,8 +99,8 @@ static DEFINE_PCI_DEVICE_TABLE(snd_emu10k1_ids) = { | |||
| 99 | 99 | ||
| 100 | MODULE_DEVICE_TABLE(pci, snd_emu10k1_ids); | 100 | MODULE_DEVICE_TABLE(pci, snd_emu10k1_ids); |
| 101 | 101 | ||
| 102 | static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci, | 102 | static int snd_card_emu10k1_probe(struct pci_dev *pci, |
| 103 | const struct pci_device_id *pci_id) | 103 | const struct pci_device_id *pci_id) |
| 104 | { | 104 | { |
| 105 | static int dev; | 105 | static int dev; |
| 106 | struct snd_card *card; | 106 | struct snd_card *card; |
| @@ -199,7 +199,7 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci, | |||
| 199 | return err; | 199 | return err; |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | static void __devexit snd_card_emu10k1_remove(struct pci_dev *pci) | 202 | static void snd_card_emu10k1_remove(struct pci_dev *pci) |
| 203 | { | 203 | { |
| 204 | snd_card_free(pci_get_drvdata(pci)); | 204 | snd_card_free(pci_get_drvdata(pci)); |
| 205 | pci_set_drvdata(pci, NULL); | 205 | pci_set_drvdata(pci, NULL); |
| @@ -215,6 +215,8 @@ static int snd_emu10k1_suspend(struct device *dev) | |||
| 215 | 215 | ||
| 216 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 216 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
| 217 | 217 | ||
| 218 | emu->suspend = 1; | ||
| 219 | |||
| 218 | snd_pcm_suspend_all(emu->pcm); | 220 | snd_pcm_suspend_all(emu->pcm); |
| 219 | snd_pcm_suspend_all(emu->pcm_mic); | 221 | snd_pcm_suspend_all(emu->pcm_mic); |
| 220 | snd_pcm_suspend_all(emu->pcm_efx); | 222 | snd_pcm_suspend_all(emu->pcm_efx); |
| @@ -260,6 +262,8 @@ static int snd_emu10k1_resume(struct device *dev) | |||
| 260 | if (emu->card_capabilities->ca0151_chip) | 262 | if (emu->card_capabilities->ca0151_chip) |
| 261 | snd_p16v_resume(emu); | 263 | snd_p16v_resume(emu); |
| 262 | 264 | ||
| 265 | emu->suspend = 0; | ||
| 266 | |||
| 263 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 267 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
| 264 | return 0; | 268 | return 0; |
| 265 | } | 269 | } |
| @@ -274,7 +278,7 @@ static struct pci_driver emu10k1_driver = { | |||
| 274 | .name = KBUILD_MODNAME, | 278 | .name = KBUILD_MODNAME, |
| 275 | .id_table = snd_emu10k1_ids, | 279 | .id_table = snd_emu10k1_ids, |
| 276 | .probe = snd_card_emu10k1_probe, | 280 | .probe = snd_card_emu10k1_probe, |
| 277 | .remove = __devexit_p(snd_card_emu10k1_remove), | 281 | .remove = snd_card_emu10k1_remove, |
| 278 | .driver = { | 282 | .driver = { |
| 279 | .pm = SND_EMU10K1_PM_OPS, | 283 | .pm = SND_EMU10K1_PM_OPS, |
| 280 | }, | 284 | }, |
