summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-08 14:50:09 +0300
committerTakashi Iwai <tiwai@suse.de>2015-01-09 19:28:44 +0300
commit5b3985ecdc6beab7db96a259fce0d8befd99ff07 (patch)
tree0fc4cc2c01215340d3732a9152f14f52db747709 /sound/pci
parenta0044463da8a20052b23eb2cd38edbe3e611942e (diff)
downloadlinux-5b3985ecdc6beab7db96a259fce0d8befd99ff07.tar.xz
ALSA: sis7019: Simplify PM callbacks
This is a similar cleanup like the commit [3db084fd0af5: ALSA: fm801: PCI core handles power state for us]. Since pci_set_power_state(), pci_save_state() and pci_restore_state() are already done in the PCI core side, so we don't need to it doubly. Also, pci_enable_device(), pci_disable_device() and pci_set_master() calls in PM callbacks are superfluous nowadays, too, so get rid of them as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/sis7019.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
index 7f6a0a0d115a..be8952f6804d 100644
--- a/sound/pci/sis7019.c
+++ b/sound/pci/sis7019.c
@@ -1211,7 +1211,6 @@ static int sis_chip_init(struct sis7019 *sis)
#ifdef CONFIG_PM_SLEEP
static int sis_suspend(struct device *dev)
{
- struct pci_dev *pci = to_pci_dev(dev);
struct snd_card *card = dev_get_drvdata(dev);
struct sis7019 *sis = card->private_data;
void __iomem *ioaddr = sis->ioaddr;
@@ -1240,9 +1239,6 @@ static int sis_suspend(struct device *dev)
ioaddr += 4096;
}
- pci_disable_device(pci);
- pci_save_state(pci);
- pci_set_power_state(pci, PCI_D3hot);
return 0;
}
@@ -1254,14 +1250,6 @@ static int sis_resume(struct device *dev)
void __iomem *ioaddr = sis->ioaddr;
int i;
- pci_set_power_state(pci, PCI_D0);
- pci_restore_state(pci);
-
- if (pci_enable_device(pci) < 0) {
- dev_err(&pci->dev, "unable to re-enable device\n");
- goto error;
- }
-
if (sis_chip_init(sis)) {
dev_err(&pci->dev, "unable to re-init controller\n");
goto error;
@@ -1284,7 +1272,6 @@ static int sis_resume(struct device *dev)
memset(sis->suspend_state[0], 0, 4096);
sis->irq = pci->irq;
- pci_set_master(pci);
if (sis->codecs_present & SIS_PRIMARY_CODEC_PRESENT)
snd_ac97_resume(sis->ac97[0]);