diff options
Diffstat (limited to 'sound/pci/als4000.c')
-rw-r--r-- | sound/pci/als4000.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c index d3e6424ee656..a3dea464134d 100644 --- a/sound/pci/als4000.c +++ b/sound/pci/als4000.c | |||
@@ -65,7 +65,7 @@ | |||
65 | * - power management? (card can do voice wakeup according to datasheet!!) | 65 | * - power management? (card can do voice wakeup according to datasheet!!) |
66 | */ | 66 | */ |
67 | 67 | ||
68 | #include <asm/io.h> | 68 | #include <linux/io.h> |
69 | #include <linux/init.h> | 69 | #include <linux/init.h> |
70 | #include <linux/pci.h> | 70 | #include <linux/pci.h> |
71 | #include <linux/gameport.h> | 71 | #include <linux/gameport.h> |
@@ -988,7 +988,6 @@ static void snd_card_als4000_remove(struct pci_dev *pci) | |||
988 | #ifdef CONFIG_PM_SLEEP | 988 | #ifdef CONFIG_PM_SLEEP |
989 | static int snd_als4000_suspend(struct device *dev) | 989 | static int snd_als4000_suspend(struct device *dev) |
990 | { | 990 | { |
991 | struct pci_dev *pci = to_pci_dev(dev); | ||
992 | struct snd_card *card = dev_get_drvdata(dev); | 991 | struct snd_card *card = dev_get_drvdata(dev); |
993 | struct snd_card_als4000 *acard = card->private_data; | 992 | struct snd_card_als4000 *acard = card->private_data; |
994 | struct snd_sb *chip = acard->chip; | 993 | struct snd_sb *chip = acard->chip; |
@@ -997,29 +996,15 @@ static int snd_als4000_suspend(struct device *dev) | |||
997 | 996 | ||
998 | snd_pcm_suspend_all(chip->pcm); | 997 | snd_pcm_suspend_all(chip->pcm); |
999 | snd_sbmixer_suspend(chip); | 998 | snd_sbmixer_suspend(chip); |
1000 | |||
1001 | pci_disable_device(pci); | ||
1002 | pci_save_state(pci); | ||
1003 | pci_set_power_state(pci, PCI_D3hot); | ||
1004 | return 0; | 999 | return 0; |
1005 | } | 1000 | } |
1006 | 1001 | ||
1007 | static int snd_als4000_resume(struct device *dev) | 1002 | static int snd_als4000_resume(struct device *dev) |
1008 | { | 1003 | { |
1009 | struct pci_dev *pci = to_pci_dev(dev); | ||
1010 | struct snd_card *card = dev_get_drvdata(dev); | 1004 | struct snd_card *card = dev_get_drvdata(dev); |
1011 | struct snd_card_als4000 *acard = card->private_data; | 1005 | struct snd_card_als4000 *acard = card->private_data; |
1012 | struct snd_sb *chip = acard->chip; | 1006 | struct snd_sb *chip = acard->chip; |
1013 | 1007 | ||
1014 | pci_set_power_state(pci, PCI_D0); | ||
1015 | pci_restore_state(pci); | ||
1016 | if (pci_enable_device(pci) < 0) { | ||
1017 | dev_err(dev, "pci_enable_device failed, disabling device\n"); | ||
1018 | snd_card_disconnect(card); | ||
1019 | return -EIO; | ||
1020 | } | ||
1021 | pci_set_master(pci); | ||
1022 | |||
1023 | snd_als4000_configure(chip); | 1008 | snd_als4000_configure(chip); |
1024 | snd_sbdsp_reset(chip); | 1009 | snd_sbdsp_reset(chip); |
1025 | snd_sbmixer_resume(chip); | 1010 | snd_sbmixer_resume(chip); |