From: Boris Brezillon Date: Tue, 6 Sep 2016 12:19:29 +0000 (+0200) Subject: mfd: atmel-hlcdc: Do not sleep in atomic context X-Git-Tag: v4.9-rc1~97^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c2469bc03d569c49119db2cccb5cb3f0c6a5b33;p=platform%2Fkernel%2Flinux-exynos.git 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: Fixes: ea31c0cf9b07 ("mfd: atmel-hlcdc: Implement config synchronization") Signed-off-by: Boris Brezillon Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c index eca7ea6..4b15b08 100644 --- a/drivers/mfd/atmel-hlcdc.c +++ b/drivers/mfd/atmel-hlcdc.c @@ -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);