From: Mythri P K mythri.p.k@intel.com
SST state change should be done under sst_lock
Signed-off-by: Mythri P K mythri.p.k@intel.com 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.c | 4 +--- sound/soc/intel/sst/sst_ipc.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/intel/sst/sst.c b/sound/soc/intel/sst/sst.c index 8eb7148..05aba24 100644 --- a/sound/soc/intel/sst/sst.c +++ b/sound/soc/intel/sst/sst.c @@ -466,16 +466,14 @@ static int intel_sst_runtime_resume(struct device *dev)
dev_info(dev, "runtime_resume called\n");
- mutex_lock(&ctx->sst_lock); if (ctx->sst_state == SST_RESET) { dev_dbg(dev, "DSP Downloading FW now...\n"); ret = sst_load_fw(ctx); if (ret) { dev_err(dev, "FW download fail %x\n", ret); - ctx->sst_state = SST_RESET; + sst_set_fw_state_locked(ctx, SST_RESET); } } - mutex_unlock(&ctx->sst_lock); return ret; }
diff --git a/sound/soc/intel/sst/sst_ipc.c b/sound/soc/intel/sst/sst_ipc.c index 2126f5b..484e609 100644 --- a/sound/soc/intel/sst/sst_ipc.c +++ b/sound/soc/intel/sst/sst_ipc.c @@ -230,7 +230,7 @@ static void process_fw_init(struct intel_sst_drv *sst_drv_ctx,
dev_dbg(sst_drv_ctx->dev, "*** FW Init msg came***\n"); if (init->result) { - sst_drv_ctx->sst_state = SST_RESET; + sst_set_fw_state_locked(sst_drv_ctx, SST_RESET); dev_err(sst_drv_ctx->dev, "FW Init failed, Error %x\n", init->result); retval = init->result;