diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-08 12:45:03 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-23 16:08:32 +0400 |
commit | c5cf4dbc7f804bb4ff02a065b927bd8688204253 (patch) | |
tree | 436873b4d92a5aa0722ec0b988abe19fef3b0179 /sound/soc/samsung/i2s.c | |
parent | 8270ba0c96702864cb0451079384e5060537d345 (diff) | |
download | linux-c5cf4dbc7f804bb4ff02a065b927bd8688204253.tar.xz |
ASoC: Add trivial pm_runtime usage to Samsung DAI drivers
Currently this won't actually do anything but using this will help the
core SoC code track when the system is idle.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/samsung/i2s.c')
-rw-r--r-- | sound/soc/samsung/i2s.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index ff5d9194d11f..87a874dc7a35 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -15,6 +15,7 @@ #include <linux/clk.h> #include <linux/io.h> #include <linux/module.h> +#include <linux/pm_runtime.h> #include <sound/soc.h> #include <sound/pcm_params.h> @@ -1095,6 +1096,8 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev) snd_soc_register_dai(&pri_dai->pdev->dev, &pri_dai->i2s_dai_drv); + pm_runtime_enable(&pdev->dev); + return 0; err: release_mem_region(regs_base, resource_size(res)); @@ -1105,6 +1108,7 @@ err: static __devexit int samsung_i2s_remove(struct platform_device *pdev) { struct i2s_dai *i2s, *other; + struct resource *res; i2s = dev_get_drvdata(&pdev->dev); other = i2s->pri_dai ? : i2s->sec_dai; @@ -1113,7 +1117,7 @@ static __devexit int samsung_i2s_remove(struct platform_device *pdev) other->pri_dai = NULL; other->sec_dai = NULL; } else { - struct resource *res; + pm_runtime_disable(&pdev->dev); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res) release_mem_region(res->start, resource_size(res)); |