summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorChiYuan Huang <cy_huang@richtek.com>2022-05-19 10:13:37 +0800
committerMark Brown <broonie@kernel.org>2022-05-19 16:47:11 +0100
commit57f68f2168988e574133fb5abcd73949bf1d1df2 (patch)
treec3d8543746e1b8d60d26f5900d16ee476f165fea /sound/soc
parent17572892e3beefe68d0875ecfd015eef521c244d (diff)
downloadlinux-57f68f2168988e574133fb5abcd73949bf1d1df2.tar.bz2
ASoC: rt9120: Fix 3byte read, valule offset typo
For RG 3byte read, the value order is offset [0], [1], and [2]. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1652926418-8519-2-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/rt9120.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt9120.c b/sound/soc/codecs/rt9120.c
index cdf8ad2f23a4..94d42be8d840 100644
--- a/sound/soc/codecs/rt9120.c
+++ b/sound/soc/codecs/rt9120.c
@@ -372,7 +372,7 @@ static int rt9120_reg_read(void *context, unsigned int reg, unsigned int *val)
*val = be32_to_cpup((__be32 *)raw);
break;
case 3:
- *val = raw[0] << 16 | raw[1] << 8 | raw[0];
+ *val = raw[0] << 16 | raw[1] << 8 | raw[2];
break;
case 2:
*val = be16_to_cpup((__be16 *)raw);