提交 1aa91b6d 编写于 作者: A Arnd Bergmann 提交者: 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: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NXia Kaixu <kaixu.xia@linaro.org>
Tested-by: NTushar Behera <tushar.behera@linaro.org>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 01c2cb67
......@@ -274,7 +274,7 @@ static irqreturn_t iis_irq(int irqno, void *dev_id)
addr = readl(idma.regs + I2SLVL0ADDR) - idma.lp_tx_addr;
addr += prtd->periodsz;
addr %= (prtd->end - prtd->start);
addr %= (u32)(prtd->end - prtd->start);
addr += idma.lp_tx_addr;
writel(addr, idma.regs + I2SLVL0ADDR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册