summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/lpass-rx-macro.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2024-06-25 18:57:36 +0200
committerMark Brown <broonie@kernel.org>2024-06-26 17:34:55 +0200
commit06462d6f3fb3c445b5abac7b134d9fe9e361113f (patch)
treea1499e80ae7d0134cb6e50648603b5a3a483d9de /sound/soc/codecs/lpass-rx-macro.c
parentASoC: codecs: lpass-macro: Gracefully handle unknown version (diff)
downloadlinux-06462d6f3fb3c445b5abac7b134d9fe9e361113f.tar.xz
linux-06462d6f3fb3c445b5abac7b134d9fe9e361113f.zip
ASoC: codecs: lpass-macro: Use enum for handling codec version
Replace 'int' with proper 'enum lpass_codec_version' in every place which handles the parsed codec version (not raw register values!) to be explicit about contents of the variable. This makes code easier to read and compilers could check missing switch cases. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patch.msgid.link/20240625165736.722106-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/lpass-rx-macro.c')
-rw-r--r--sound/soc/codecs/lpass-rx-macro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index 8af86509a3ff..9c4f0763675d 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -642,7 +642,7 @@ struct rx_macro {
int rx_mclk_users;
int clsh_users;
int rx_mclk_cnt;
- int codec_version;
+ enum lpass_codec_version codec_version;
int rxn_reg_stride;
bool is_ear_mode_on;
bool hph_pwr_mode;