summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuming Fan <shumingf@realtek.com>2025-12-26 09:42:55 +0300
committerMark Brown <broonie@kernel.org>2025-12-27 22:59:02 +0300
commit25abdc151a448a17d500ea9468ce32582c479faa (patch)
tree9d0c7479c39143cd945eb3191372c30077414fb8
parentfc22dfb13618ce1ae5730840607733a50569a15e (diff)
downloadlinux-25abdc151a448a17d500ea9468ce32582c479faa.tar.xz
ASoC: rt1320: fix the remainder calculation of r0 value
This patch fixes the remainder calculation of r0 value. Fixes: 836ecc740ca8 ("ASoC: rt1320: fix 32-bit link failure") Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20251226064255.993735-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/rt1320-sdw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c
index 84e9e8ab9798..6e3920d1d308 100644
--- a/sound/soc/codecs/rt1320-sdw.c
+++ b/sound/soc/codecs/rt1320-sdw.c
@@ -1093,8 +1093,8 @@ static void rt1320_calc_r0(struct rt1320_sdw_priv *rt1320)
l_calir0 = rt1320->r0_l_reg >> 27;
r_calir0 = rt1320->r0_r_reg >> 27;
- l_calir0_lo = (rt1320->r0_l_reg & ((1ull << 27) - 1) * 1000) >> 27;
- r_calir0_lo = (rt1320->r0_r_reg & ((1ull << 27) - 1) * 1000) >> 27;
+ l_calir0_lo = ((rt1320->r0_l_reg & ((1ull << 27) - 1)) * 1000) >> 27;
+ r_calir0_lo = ((rt1320->r0_r_reg & ((1ull << 27) - 1)) * 1000) >> 27;
dev_dbg(dev, "%s, l_calir0=%lld.%03lld ohm, r_calir0=%lld.%03lld ohm\n", __func__,
l_calir0, l_calir0_lo, r_calir0, r_calir0_lo);