summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2005-09-16 18:50:53 +0200
committerJaroslav Kysela <perex@suse.cz>2005-10-07 14:45:46 +0200
commit90b66e833261618e11d71a35f2488a7d664a4566 (patch)
tree2ea73440bbba650eb14e2943e2b0b1b68bc94ea3
parent72e75de2df9a7116d0afbcd5810b2a8fd4bf7559 (diff)
downloadkernel-crypto-90b66e833261618e11d71a35f2488a7d664a4566.tar.gz
kernel-crypto-90b66e833261618e11d71a35f2488a7d664a4566.tar.xz
kernel-crypto-90b66e833261618e11d71a35f2488a7d664a4566.zip
[ALSA] clean suspend/resume calls for ac97_bus_type
AC97 Codec A single call to the driver suspend/resume method for each device is enough. The level and SUSPEND_*/RESUME_* arguments are deprecated and said to be removed eventually anyway (no other subsystem are using them anymore except platform devices). Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/ac97/ac97_bus.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/sound/pci/ac97/ac97_bus.c b/sound/pci/ac97/ac97_bus.c
index 6f0e4bd83aa..becbc420ba4 100644
--- a/sound/pci/ac97/ac97_bus.c
+++ b/sound/pci/ac97/ac97_bus.c
@@ -30,13 +30,8 @@ static int ac97_bus_suspend(struct device *dev, pm_message_t state)
{
int ret = 0;
- if (dev->driver && dev->driver->suspend) {
- ret = dev->driver->suspend(dev, state, SUSPEND_DISABLE);
- if (ret == 0)
- ret = dev->driver->suspend(dev, state, SUSPEND_SAVE_STATE);
- if (ret == 0)
- ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN);
- }
+ if (dev->driver && dev->driver->suspend)
+ ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN);
return ret;
}
@@ -44,13 +39,8 @@ static int ac97_bus_resume(struct device *dev)
{
int ret = 0;
- if (dev->driver && dev->driver->resume) {
+ if (dev->driver && dev->driver->resume)
ret = dev->driver->resume(dev, RESUME_POWER_ON);
- if (ret == 0)
- ret = dev->driver->resume(dev, RESUME_RESTORE_STATE);
- if (ret == 0)
- ret = dev->driver->resume(dev, RESUME_ENABLE);
- }
return ret;
}