aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-08 06:46:07 -0500
committerTakashi Iwai <tiwai@suse.de>2015-01-09 10:24:20 -0500
commitf84edab4b59bd004853224703acb03628af6c2ce (patch)
treedc6d78eb957945dd482d16aa872fa1ae497f9f01
parent7247aabd5ace16677681f815cc34f84ef0278261 (diff)
ALSA: echoaudio: 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>
-rw-r--r--sound/pci/echoaudio/echoaudio.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 21228adaa70c..58960841ae7c 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -2162,7 +2162,6 @@ ctl_error:
2162 2162
2163static int snd_echo_suspend(struct device *dev) 2163static int snd_echo_suspend(struct device *dev)
2164{ 2164{
2165 struct pci_dev *pci = to_pci_dev(dev);
2166 struct echoaudio *chip = dev_get_drvdata(dev); 2165 struct echoaudio *chip = dev_get_drvdata(dev);
2167 2166
2168 snd_pcm_suspend_all(chip->analog_pcm); 2167 snd_pcm_suspend_all(chip->analog_pcm);
@@ -2188,9 +2187,6 @@ static int snd_echo_suspend(struct device *dev)
2188 chip->dsp_code = NULL; 2187 chip->dsp_code = NULL;
2189 free_irq(chip->irq, chip); 2188 free_irq(chip->irq, chip);
2190 chip->irq = -1; 2189 chip->irq = -1;
2191 pci_save_state(pci);
2192 pci_disable_device(pci);
2193
2194 return 0; 2190 return 0;
2195} 2191}
2196 2192
@@ -2204,7 +2200,6 @@ static int snd_echo_resume(struct device *dev)
2204 u32 pipe_alloc_mask; 2200 u32 pipe_alloc_mask;
2205 int err; 2201 int err;
2206 2202
2207 pci_restore_state(pci);
2208 commpage_bak = kmalloc(sizeof(struct echoaudio), GFP_KERNEL); 2203 commpage_bak = kmalloc(sizeof(struct echoaudio), GFP_KERNEL);
2209 if (commpage_bak == NULL) 2204 if (commpage_bak == NULL)
2210 return -ENOMEM; 2205 return -ENOMEM;