aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/common
diff options
context:
space:
mode:
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>2017-12-06 16:34:01 +0530
committerMark Brown <broonie@kernel.org>2017-12-06 17:44:50 +0000
commitb2ca3bdd07f68ca63fdb8e45f1fe039ba6af54a2 (patch)
tree7fc0653deaa67177b7d39f858fc379f62ef9f88f /sound/soc/intel/common
parentASoC: don't use rtd->codec on Intel/haswell (diff)
downloadlinux-dev-b2ca3bdd07f68ca63fdb8e45f1fe039ba6af54a2.tar.xz
linux-dev-b2ca3bdd07f68ca63fdb8e45f1fe039ba6af54a2.zip
ASoC: Intel: Skylake: Remove second shim read in register_poll
No need to read the register again if the value read has already matched the target during the loop. So remove the second shim read. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/common')
-rw-r--r--sound/soc/intel/common/sst-dsp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c
index 11c0805393ff..fd82f4b1d4a0 100644
--- a/sound/soc/intel/common/sst-dsp.c
+++ b/sound/soc/intel/common/sst-dsp.c
@@ -269,7 +269,7 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask,
*/
timeout = jiffies + msecs_to_jiffies(time);
- while (((sst_dsp_shim_read_unlocked(ctx, offset) & mask) != target)
+ while ((((reg = sst_dsp_shim_read_unlocked(ctx, offset)) & mask) != target)
&& time_before(jiffies, timeout)) {
k++;
if (k > 10)
@@ -278,8 +278,6 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask,
usleep_range(s, 2*s);
}
- reg = sst_dsp_shim_read_unlocked(ctx, offset);
-
if ((reg & mask) == target) {
dev_dbg(ctx->dev, "FW Poll Status: reg=%#x %s successful\n",
reg, operation);