diff options
author | Cliff Cai <cliff.cai@analog.com> | 2010-08-07 11:16:27 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-08-10 10:42:32 -0400 |
commit | ac770267a7cd85a747b6111db46f66d1515e7cd7 (patch) | |
tree | d2934c8c2f69f47472e6b505bc078c4c37e57e0c /sound/soc | |
parent | 4f0ed9a51bc8ef16c2589112fdb110479e4b0df1 (diff) |
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
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/soc-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, | |||
340 | static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec, | 340 | static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec, |
341 | unsigned int reg) | 341 | unsigned int reg) |
342 | { | 342 | { |
343 | u16 *cache = codec->reg_cache; | 343 | u8 *cache = codec->reg_cache; |
344 | 344 | ||
345 | reg &= 0xff; | 345 | reg &= 0xff; |
346 | if (reg >= codec->reg_cache_size) | 346 | if (reg >= codec->reg_cache_size) |
@@ -351,7 +351,7 @@ static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec, | |||
351 | static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg, | 351 | static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg, |
352 | unsigned int value) | 352 | unsigned int value) |
353 | { | 353 | { |
354 | u16 *cache = codec->reg_cache; | 354 | u8 *cache = codec->reg_cache; |
355 | u8 data[3]; | 355 | u8 data[3]; |
356 | int ret; | 356 | int ret; |
357 | 357 | ||