Skip to content

Commit 29aab38

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: fsl_sai: fix getting version from VERID
The version information is at the bit31 ~ bit16 in the VERID register, so need to right shift 16bit to get it, otherwise the result of comparison "sai->verid.version >= 0x0301" is wrong. Fixes: 99c1e74 ("ASoC: fsl_sai: store full version instead of major/minor") Signed-off-by: Shengjiu Wang <[email protected]> Reviewed-by: Iuliana Prodan <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 95ff4aa commit 29aab38

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sound/soc/fsl/fsl_sai.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,7 @@ static int fsl_sai_check_version(struct device *dev)
11411141

11421142
sai->verid.version = val &
11431143
(FSL_SAI_VERID_MAJOR_MASK | FSL_SAI_VERID_MINOR_MASK);
1144+
sai->verid.version >>= FSL_SAI_VERID_MINOR_SHIFT;
11441145
sai->verid.feature = val & FSL_SAI_VERID_FEATURE_MASK;
11451146

11461147
ret = regmap_read(sai->regmap, FSL_SAI_PARAM, &val);

0 commit comments

Comments
 (0)