Skip to content

Commit f0c8d74

Browse files
Judy Hsiaobroonie
authored andcommitted
ASoC: rockchip: i2s: use regmap_read_poll_timeout_atomic to poll I2S_CLR
1. Uses regmap_read_poll_timeout_atomic to poll I2S_CLR as it is called within a spin lock. 2. Fixes the typo of break condition in regmap_read_poll_timeout_atomic. Fixes: fbb0ec6 ("ASoC: rockchip: i2s: use regmap_read_poll_timeout to poll I2S_CLR") Signed-off-by: Judy Hsiao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 8531109 commit f0c8d74

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

sound/soc/rockchip/rockchip_i2s.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ static int rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on)
162162
I2S_CLR_TXC | I2S_CLR_RXC);
163163
if (ret < 0)
164164
goto end;
165-
ret = regmap_read_poll_timeout(i2s->regmap,
166-
I2S_CLR,
167-
val,
168-
val != 0,
169-
20,
170-
200);
165+
ret = regmap_read_poll_timeout_atomic(i2s->regmap,
166+
I2S_CLR,
167+
val,
168+
val == 0,
169+
20,
170+
200);
171171
if (ret < 0)
172172
dev_warn(i2s->dev, "fail to clear: %d\n", ret);
173173
}
@@ -220,12 +220,12 @@ static int rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on)
220220
I2S_CLR_TXC | I2S_CLR_RXC);
221221
if (ret < 0)
222222
goto end;
223-
ret = regmap_read_poll_timeout(i2s->regmap,
224-
I2S_CLR,
225-
val,
226-
val != 0,
227-
20,
228-
200);
223+
ret = regmap_read_poll_timeout_atomic(i2s->regmap,
224+
I2S_CLR,
225+
val,
226+
val == 0,
227+
20,
228+
200);
229229
if (ret < 0)
230230
dev_warn(i2s->dev, "fail to clear: %d\n", ret);
231231
}

0 commit comments

Comments
 (0)