summaryrefslogtreecommitdiff
path: root/sound/soc/samsung/pcm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-08 12:45:03 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-23 16:08:32 +0400
commitc5cf4dbc7f804bb4ff02a065b927bd8688204253 (patch)
tree436873b4d92a5aa0722ec0b988abe19fef3b0179 /sound/soc/samsung/pcm.c
parent8270ba0c96702864cb0451079384e5060537d345 (diff)
downloadlinux-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/pcm.c')
-rw-r--r--sound/soc/samsung/pcm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index 5776addd1f94..56780206c000 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -14,6 +14,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>
@@ -580,6 +581,8 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id];
pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id];
+ pm_runtime_enable(&pdev->dev);
+
ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]);
if (ret != 0) {
dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret);
@@ -609,6 +612,8 @@ static __devexit int s3c_pcm_dev_remove(struct platform_device *pdev)
snd_soc_unregister_dai(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+
iounmap(pcm->regs);
mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);