From: Axel Lin Date: Sat, 12 Oct 2013 09:24:25 +0000 (+0800) Subject: ASoC: pcm1681: Fix max_register setting X-Git-Tag: MMI-PSA29.97-13-9~13196^2~77^2~69^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=64256ac6c2b6fb598fbe187a5503fd9dbb810374;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ASoC: pcm1681: Fix max_register setting According to the datasheet, the max_register is 13h. ARRAY_SIZE(pcm1681_reg_defaults) + 1 is 18 which is wrong. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c index 651ce0923675..c91eba504f92 100644 --- a/sound/soc/codecs/pcm1681.c +++ b/sound/soc/codecs/pcm1681.c @@ -270,7 +270,7 @@ MODULE_DEVICE_TABLE(of, pcm1681_dt_ids); static const struct regmap_config pcm1681_regmap = { .reg_bits = 8, .val_bits = 8, - .max_register = ARRAY_SIZE(pcm1681_reg_defaults) + 1, + .max_register = 0x13, .reg_defaults = pcm1681_reg_defaults, .num_reg_defaults = ARRAY_SIZE(pcm1681_reg_defaults), .writeable_reg = pcm1681_writeable_reg,