projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
187c43d
)
ASoC: Intel: Skylake: Remove second shim read in register_poll
author
Subhransu S. Prusty
<
[email protected]
>
Wed, 6 Dec 2017 11:04:01 +0000
(16:34 +0530)
committer
Mark Brown
<
[email protected]
>
Wed, 6 Dec 2017 17:44:50 +0000
(17:44 +0000)
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 <
[email protected]
>
Signed-off-by: Guneshwor Singh <
[email protected]
>
Acked-by: Vinod Koul <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
sound/soc/intel/common/sst-dsp.c
patch
|
blob
|
history
diff --git
a/sound/soc/intel/common/sst-dsp.c
b/sound/soc/intel/common/sst-dsp.c
index 11c0805393ff96c50b03b2b29fb70a32b53fa3dc..fd82f4b1d4a07bc2b289a27b9edf4a4610606587 100644
(file)
--- 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);