diff mbox

[1/3] ASoC: Intel: mrfld: Fix runtime pm calls in sst_open_pcm_stream

Message ID 1414645736-24426-2-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Commit 1a6db0bd26a72027d6a5ea006d64d4021fd0326e
Headers show

Commit Message

Vinod Koul Oct. 30, 2014, 5:08 a.m. UTC
From: Subhransu S. Prusty <subhransu.s.prusty@intel.com>

It's already done in open/close.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/sst/sst_drv_interface.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

Comments

Mark Brown Oct. 31, 2014, 12:30 p.m. UTC | #1
On Thu, Oct 30, 2014 at 10:38:54AM +0530, Vinod Koul wrote:
> From: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
> 
> It's already done in open/close.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/intel/sst/sst_drv_interface.c b/sound/soc/intel/sst/sst_drv_interface.c
index 183b1eb..4187057 100644
--- a/sound/soc/intel/sst/sst_drv_interface.c
+++ b/sound/soc/intel/sst/sst_drv_interface.c
@@ -163,16 +163,11 @@  static int sst_open_pcm_stream(struct device *dev,
 	if (!str_param)
 		return -EINVAL;
 
-	retval = pm_runtime_get_sync(ctx->dev);
-	if (retval < 0)
-		return retval;
 	retval = sst_get_stream(ctx, str_param);
-	if (retval > 0) {
+	if (retval > 0)
 		ctx->stream_cnt++;
-	} else {
+	else
 		dev_err(ctx->dev, "sst_get_stream returned err %d\n", retval);
-		sst_pm_runtime_put(ctx);
-	}
 
 	return retval;
 }
@@ -212,7 +207,8 @@  put:
 	stream->period_elapsed = NULL;
 	ctx->stream_cnt--;
 
-	sst_pm_runtime_put(ctx);
+	if (retval)
+		dev_err(ctx->dev, "free stream returned err %d\n", retval);
 
 	dev_dbg(ctx->dev, "Exit\n");
 	return 0;