Commit ac770267 authored by Cliff Cai's avatar Cliff Cai Committed by Mark Brown

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

Signed-off-by: default avatarCliff Cai <cliff.cai@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
parent 4f0ed9a5
...@@ -340,7 +340,7 @@ static unsigned int snd_soc_16_8_read_i2c(struct snd_soc_codec *codec, ...@@ -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, static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec,
unsigned int reg) unsigned int reg)
{ {
u16 *cache = codec->reg_cache; u8 *cache = codec->reg_cache;
reg &= 0xff; reg &= 0xff;
if (reg >= codec->reg_cache_size) if (reg >= codec->reg_cache_size)
...@@ -351,7 +351,7 @@ static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec, ...@@ -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, static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value) unsigned int value)
{ {
u16 *cache = codec->reg_cache; u8 *cache = codec->reg_cache;
u8 data[3]; u8 data[3];
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment