Commit 1aa91b6d authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mark Brown

ASoC: samsung-idma: avoid 64-bit division

dma_addr_t may be 64 bit wide, which causes a build failure
when doing a division on it. Here it is safe to cast to an
u32 type, which avoids the problem.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarXia Kaixu <kaixu.xia@linaro.org>
Tested-by: default avatarTushar Behera <tushar.behera@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 01c2cb67
...@@ -274,7 +274,7 @@ static irqreturn_t iis_irq(int irqno, void *dev_id) ...@@ -274,7 +274,7 @@ static irqreturn_t iis_irq(int irqno, void *dev_id)
addr = readl(idma.regs + I2SLVL0ADDR) - idma.lp_tx_addr; addr = readl(idma.regs + I2SLVL0ADDR) - idma.lp_tx_addr;
addr += prtd->periodsz; addr += prtd->periodsz;
addr %= (prtd->end - prtd->start); addr %= (u32)(prtd->end - prtd->start);
addr += idma.lp_tx_addr; addr += idma.lp_tx_addr;
writel(addr, idma.regs + I2SLVL0ADDR); writel(addr, idma.regs + I2SLVL0ADDR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment