ASoC: register cache should be 1 byte aligned for 1 byte long register
authorCliff Cai <cliff.cai@analog.com>
Sat, 7 Aug 2010 15:16:27 +0000 (11:16 -0400)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 10 Aug 2010 14:42:32 +0000 (15:42 +0100)
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
sound/soc/soc-cache.c

index 472af38188c11b3c9d64beaffd04809d31f9ca63..adbc68ce90508221cc919121fc19e062fd309f44 100644 (file)
@@ -340,7 +340,7 @@ static unsigned int snd_soc_16_8_read_i2c(struct snd_soc_codec *codec,
 static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec,
                                     unsigned int reg)
 {
-       u16 *cache = codec->reg_cache;
+       u8 *cache = codec->reg_cache;
 
        reg &= 0xff;
        if (reg >= codec->reg_cache_size)
@@ -351,7 +351,7 @@ static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec,
 static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg,
                             unsigned int value)
 {
-       u16 *cache = codec->reg_cache;
+       u8 *cache = codec->reg_cache;
        u8 data[3];
        int ret;