提交 2c2469bc 编写于 作者: B Boris Brezillon 提交者: Lee Jones

mfd: atmel-hlcdc: Do not sleep in atomic context

readl_poll_timeout() calls usleep_range(), but
regmap_atmel_hlcdc_reg_write() is called in atomic context (regmap
spinlock held).

Replace the readl_poll_timeout() call by readl_poll_timeout_atomic().

Cc: <stable@vger.kernel.org>
Fixes: ea31c0cf ("mfd: atmel-hlcdc: Implement config synchronization")
Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 22a96b85
......@@ -50,8 +50,9 @@ static int regmap_atmel_hlcdc_reg_write(void *context, unsigned int reg,
if (reg <= ATMEL_HLCDC_DIS) {
u32 status;
readl_poll_timeout(hregmap->regs + ATMEL_HLCDC_SR, status,
!(status & ATMEL_HLCDC_SIP), 1, 100);
readl_poll_timeout_atomic(hregmap->regs + ATMEL_HLCDC_SR,
status, !(status & ATMEL_HLCDC_SIP),
1, 100);
}
writel(val, hregmap->regs + reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册