]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: cs4349: Fix max_register setting for cs4349_regmap
authorAxel Lin <axel.lin@ingics.com>
Fri, 17 Jul 2015 15:38:34 +0000 (23:38 +0800)
committerMark Brown <broonie@kernel.org>
Sat, 18 Jul 2015 21:30:10 +0000 (22:30 +0100)
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>
sound/soc/codecs/cs4349.c
sound/soc/codecs/cs4349.h

index a8df8a74960716ac2bf105027e5922c1bae36336..9273b06e918b218f73255ebad01d32155549ecff 100644 (file)
@@ -268,7 +268,7 @@ static struct regmap_config cs4349_regmap = {
        .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,
index 3884a8907d23dc269b4e0df66bb0b49f4df66423..7effa0acec28e00a680c95a28b6b7cd5891b5db4 100644 (file)
@@ -36,9 +36,6 @@ struct cs4349_platform_data {
 #define CS4349_RMPFLT          0x07    /* Ramp and Filter Control */
 #define CS4349_MISC            0x08    /* Power Down,Freeze Control,Pop Stop*/
 
-#define CS4349_FIRSTREG                0x01
-#define CS4349_LASTREG         0x08
-#define CS4349_NUMREGS         (CS4349_LASTREG - CS4349_FIRSTREG + 1)
 #define CS4349_I2C_INCR                0x80