summaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-04-29 19:18:25 +0800
committerMark Brown <broonie@linaro.org>2014-04-30 20:31:13 -0700
commit1aa91b6dd44a9517dee42913ecf9f51650b32cb6 (patch)
treec57888179dd5ab97a3c112f5fcf7fbb6ed2f20ca /sound/soc/samsung
parent01c2cb67eaa37f86196e3e6074dea096fe46511a (diff)
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: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org> Tested-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/samsung')
-rw-r--r--sound/soc/samsung/idma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c
index 3d5cf1530b6..e9891b44f0e 100644
--- a/sound/soc/samsung/idma.c
+++ b/sound/soc/samsung/idma.c
@@ -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);