ASoC: cs4349: Fix max_register setting for cs4349_regmap
The max_register should be the maximum valid register index rather than
number of registers. Also remove unused defines.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Tim Howe <tim.howe@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c
index a8df8a74..9273b06 100644
--- a/sound/soc/codecs/cs4349.c
+++ b/sound/soc/codecs/cs4349.c
@@ -268,7 +268,7 @@
.reg_bits = 8,
.val_bits = 8,
- .max_register = CS4349_NUMREGS,
+ .max_register = CS4349_MISC,
.reg_defaults = cs4349_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(cs4349_reg_defaults),
.readable_reg = cs4349_readable_register,