From: Cliff Cai Date: Sat, 7 Aug 2010 15:16:27 +0000 (-0400) Subject: ASoC: register cache should be 1 byte aligned for 1 byte long register X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ac770267a7cd85a747b6111db46f66d1515e7cd7;p=linux-beck.git ASoC: register cache should be 1 byte aligned for 1 byte long register Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger Acked-by: Liam Girdwood Signed-off-by: Mark Brown Cc: stable@kernel.org --- diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index 472af38188c1..adbc68ce9050 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c @@ -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;