Skip to content

Commit 2c2469b

Browse files
Boris BrezillonLee Jones
authored andcommitted
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: ea31c0c ("mfd: atmel-hlcdc: Implement config synchronization") Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent 22a96b8 commit 2c2469b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎drivers/mfd/atmel-hlcdc.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ static int regmap_atmel_hlcdc_reg_write(void *context, unsigned int reg,
5050
if (reg <= ATMEL_HLCDC_DIS) {
5151
u32 status;
5252

53-
readl_poll_timeout(hregmap->regs + ATMEL_HLCDC_SR, status,
54-
!(status & ATMEL_HLCDC_SIP), 1, 100);
53+
readl_poll_timeout_atomic(hregmap->regs + ATMEL_HLCDC_SR,
54+
status, !(status & ATMEL_HLCDC_SIP),
55+
1, 100);
5556
}
5657

5758
writel(val, hregmap->regs + reg);

0 commit comments

Comments
 (0)