]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:43:13 +0000 (16:43 -0700)
commit ac770267a7cd85a747b6111db46f66d1515e7cd7 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/soc/soc-cache.c

index 5869dc3be7815cc6cbadb03165c2f9d84d4dae86..a0b45be1e3da14946ba3a707a4af411ffd8729f5 100644 (file)
@@ -296,7 +296,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)
@@ -307,7 +307,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;