Skip to content

Commit

Permalink
ASoC: register cache should be 1 byte aligned for 1 byte long register
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Cliff Cai authored and Mark Brown committed Aug 10, 2010
1 parent 4f0ed9a commit ac77026
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;

Expand Down

0 comments on commit ac77026

Please sign in to comment.