aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97/ac97_bus.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2005-09-16 12:50:53 -0400
committerJaroslav Kysela <perex@suse.cz>2005-10-07 08:45:46 -0400
commit90b66e833261618e11d71a35f2488a7d664a4566 (patch)
tree2ea73440bbba650eb14e2943e2b0b1b68bc94ea3 /sound/pci/ac97/ac97_bus.c
parent72e75de2df9a7116d0afbcd5810b2a8fd4bf7559 (diff)
[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>
Diffstat (limited to 'sound/pci/ac97/ac97_bus.c')
-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)
30{ 30{
31 int ret = 0; 31 int ret = 0;
32 32
33 if (dev->driver && dev->driver->suspend) { 33 if (dev->driver && dev->driver->suspend)
34 ret = dev->driver->suspend(dev, state, SUSPEND_DISABLE); 34 ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN);
35 if (ret == 0)
36 ret = dev->driver->suspend(dev, state, SUSPEND_SAVE_STATE);
37 if (ret == 0)
38 ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN);
39 }
40 return ret; 35 return ret;
41} 36}
42 37
@@ -44,13 +39,8 @@ static int ac97_bus_resume(struct device *dev)
44{ 39{
45 int ret = 0; 40 int ret = 0;
46 41
47 if (dev->driver && dev->driver->resume) { 42 if (dev->driver && dev->driver->resume)
48 ret = dev->driver->resume(dev, RESUME_POWER_ON); 43 ret = dev->driver->resume(dev, RESUME_POWER_ON);
49 if (ret == 0)
50 ret = dev->driver->resume(dev, RESUME_RESTORE_STATE);
51 if (ret == 0)
52 ret = dev->driver->resume(dev, RESUME_ENABLE);
53 }
54 return ret; 44 return ret;
55} 45}
56 46