summaryrefslogtreecommitdiffstats
path: root/sound/pci/atiixp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/atiixp.c')
-rw-r--r--sound/pci/atiixp.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 9c1c4452a8ee..d5f15c9bbeda 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -19,7 +19,7 @@
19 * 19 *
20 */ 20 */
21 21
22#include <asm/io.h> 22#include <linux/io.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/init.h> 25#include <linux/init.h>
@@ -1474,7 +1474,6 @@ static int snd_atiixp_mixer_new(struct atiixp *chip, int clock,
1474 */ 1474 */
1475static int snd_atiixp_suspend(struct device *dev) 1475static int snd_atiixp_suspend(struct device *dev)
1476{ 1476{
1477 struct pci_dev *pci = to_pci_dev(dev);
1478 struct snd_card *card = dev_get_drvdata(dev); 1477 struct snd_card *card = dev_get_drvdata(dev);
1479 struct atiixp *chip = card->private_data; 1478 struct atiixp *chip = card->private_data;
1480 int i; 1479 int i;
@@ -1492,29 +1491,15 @@ static int snd_atiixp_suspend(struct device *dev)
1492 snd_ac97_suspend(chip->ac97[i]); 1491 snd_ac97_suspend(chip->ac97[i]);
1493 snd_atiixp_aclink_down(chip); 1492 snd_atiixp_aclink_down(chip);
1494 snd_atiixp_chip_stop(chip); 1493 snd_atiixp_chip_stop(chip);
1495
1496 pci_disable_device(pci);
1497 pci_save_state(pci);
1498 pci_set_power_state(pci, PCI_D3hot);
1499 return 0; 1494 return 0;
1500} 1495}
1501 1496
1502static int snd_atiixp_resume(struct device *dev) 1497static int snd_atiixp_resume(struct device *dev)
1503{ 1498{
1504 struct pci_dev *pci = to_pci_dev(dev);
1505 struct snd_card *card = dev_get_drvdata(dev); 1499 struct snd_card *card = dev_get_drvdata(dev);
1506 struct atiixp *chip = card->private_data; 1500 struct atiixp *chip = card->private_data;
1507 int i; 1501 int i;
1508 1502
1509 pci_set_power_state(pci, PCI_D0);
1510 pci_restore_state(pci);
1511 if (pci_enable_device(pci) < 0) {
1512 dev_err(dev, "pci_enable_device failed, disabling device\n");
1513 snd_card_disconnect(card);
1514 return -EIO;
1515 }
1516 pci_set_master(pci);
1517
1518 snd_atiixp_aclink_reset(chip); 1503 snd_atiixp_aclink_reset(chip);
1519 snd_atiixp_chip_start(chip); 1504 snd_atiixp_chip_start(chip);
1520 1505
@@ -1585,8 +1570,7 @@ static int snd_atiixp_free(struct atiixp *chip)
1585 __hw_end: 1570 __hw_end:
1586 if (chip->irq >= 0) 1571 if (chip->irq >= 0)
1587 free_irq(chip->irq, chip); 1572 free_irq(chip->irq, chip);
1588 if (chip->remap_addr) 1573 iounmap(chip->remap_addr);
1589 iounmap(chip->remap_addr);
1590 pci_release_regions(chip->pci); 1574 pci_release_regions(chip->pci);
1591 pci_disable_device(chip->pci); 1575 pci_disable_device(chip->pci);
1592 kfree(chip); 1576 kfree(chip);