mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
mfd: atmel-hlcdc: Do not sleep in atomic context
commit2c2469bc03upstream. 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(). Fixes:ea31c0cf9b("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9de8720a92
commit
5303b53ef3
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user