Commit f6fcdc14 authored by Mark Brown's avatar Mark Brown

Merge branch 'for-2.6.39' into for-2.6.40

parents 04368d05 00b317a4
...@@ -92,8 +92,8 @@ static int min_bytes_needed(unsigned long val) ...@@ -92,8 +92,8 @@ static int min_bytes_needed(unsigned long val)
static int format_register_str(struct snd_soc_codec *codec, static int format_register_str(struct snd_soc_codec *codec,
unsigned int reg, char *buf, size_t len) unsigned int reg, char *buf, size_t len)
{ {
int wordsize = codec->driver->reg_word_size * 2; int wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
int regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; int regsize = codec->driver->reg_word_size * 2;
int ret; int ret;
char tmpbuf[len + 1]; char tmpbuf[len + 1];
char regbuf[regsize + 1]; char regbuf[regsize + 1];
...@@ -132,8 +132,8 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf, ...@@ -132,8 +132,8 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf,
size_t total = 0; size_t total = 0;
loff_t p = 0; loff_t p = 0;
wordsize = codec->driver->reg_word_size * 2; wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; regsize = codec->driver->reg_word_size * 2;
len = wordsize + regsize + 2 + 1; len = wordsize + regsize + 2 + 1;
......
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