提交 66e27788 编写于 作者: M Martin Langer 提交者: Jaroslav Kysela

[ALSA] ac97_bus power management

This patch adds CONFIG_PM to the ac97_bus driver.
Signed-off-by: NMartin Langer <martin-langer@gmx.de>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@suse.cz>
上级 d0b0fac1
...@@ -26,6 +26,7 @@ static int ac97_bus_match(struct device *dev, struct device_driver *drv) ...@@ -26,6 +26,7 @@ static int ac97_bus_match(struct device *dev, struct device_driver *drv)
return 1; return 1;
} }
#ifdef CONFIG_PM
static int ac97_bus_suspend(struct device *dev, pm_message_t state) static int ac97_bus_suspend(struct device *dev, pm_message_t state)
{ {
int ret = 0; int ret = 0;
...@@ -45,12 +46,15 @@ static int ac97_bus_resume(struct device *dev) ...@@ -45,12 +46,15 @@ static int ac97_bus_resume(struct device *dev)
return ret; return ret;
} }
#endif /* CONFIG_PM */
struct bus_type ac97_bus_type = { struct bus_type ac97_bus_type = {
.name = "ac97", .name = "ac97",
.match = ac97_bus_match, .match = ac97_bus_match,
#ifdef CONFIG_PM
.suspend = ac97_bus_suspend, .suspend = ac97_bus_suspend,
.resume = ac97_bus_resume, .resume = ac97_bus_resume,
#endif /* CONFIG_PM */
}; };
static int __init ac97_bus_init(void) static int __init ac97_bus_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册