Commit 57f68f21 authored by ChiYuan Huang's avatar ChiYuan Huang Committed by Mark Brown

ASoC: rt9120: Fix 3byte read, valule offset typo

For RG 3byte read, the value order is  offset [0], [1], and [2].
Signed-off-by: default avatarChiYuan Huang <cy_huang@richtek.com>
Link: https://lore.kernel.org/r/1652926418-8519-2-git-send-email-u0084500@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 17572892
......@@ -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);
......
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