summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/atmel-hlcdc.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2016-09-06 08:19:29 -0400
committerLee Jones <lee.jones@linaro.org>2016-10-04 10:48:04 -0400
commit2c2469bc03d569c49119db2cccb5cb3f0c6a5b33 (patch)
tree420d4289e1777c496ca2c19699a0908bdba6918b /drivers/mfd/atmel-hlcdc.c
parent22a96b85eabd05a77bd1388d041d96ccc8f86459 (diff)
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: ea31c0cf9b07 ("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>
Diffstat (limited to 'drivers/mfd/atmel-hlcdc.c')
-rw-r--r--drivers/mfd/atmel-hlcdc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c
index eca7ea69b81c..4b15b0840f16 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,
50 if (reg <= ATMEL_HLCDC_DIS) { 50 if (reg <= ATMEL_HLCDC_DIS) {
51 u32 status; 51 u32 status;
52 52
53 readl_poll_timeout(hregmap->regs + ATMEL_HLCDC_SR, status, 53 readl_poll_timeout_atomic(hregmap->regs + ATMEL_HLCDC_SR,
54 !(status & ATMEL_HLCDC_SIP), 1, 100); 54 status, !(status & ATMEL_HLCDC_SIP),
55 1, 100);
55 } 56 }
56 57
57 writel(val, hregmap->regs + reg); 58 writel(val, hregmap->regs + reg);