ASoC: register cache should be 1 byte aligned for 1 byte long register

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

authored by Cliff Cai and committed by Mark Brown ac770267 4f0ed9a5

+2 -2
+2 -2
sound/soc/soc-cache.c
··· 340 static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec, 341 unsigned int reg) 342 { 343 - u16 *cache = codec->reg_cache; 344 345 reg &= 0xff; 346 if (reg >= codec->reg_cache_size) ··· 351 static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg, 352 unsigned int value) 353 { 354 - u16 *cache = codec->reg_cache; 355 u8 data[3]; 356 int ret; 357
··· 340 static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec, 341 unsigned int reg) 342 { 343 + u8 *cache = codec->reg_cache; 344 345 reg &= 0xff; 346 if (reg >= codec->reg_cache_size) ··· 351 static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg, 352 unsigned int value) 353 { 354 + u8 *cache = codec->reg_cache; 355 u8 data[3]; 356 int ret; 357