From e7ec7859b697c751c09d965f86be017c5bb82416 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 17 Feb 2012 14:33:29 -0800 Subject: [PATCH] --- yaml --- r: 293399 b: refs/heads/master c: 2b4bdee2920fb3894f9116f76343f8b31f9e4da8 h: refs/heads/master i: 293397: c7757acb722ad7c1b793682aa75c9b3b3fc94ea8 293395: 0cdd5b40ab5bc9553a8a2caeeab668b024ad858a 293391: 33a1b872a5f2ab369d2f52e3399c6affc5db16cb v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-io.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e43c9951ba30..a3c7870b2e1b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 82150451816ac6d735d8f90babe102636121d67e +refs/heads/master: 2b4bdee2920fb3894f9116f76343f8b31f9e4da8 diff --git a/trunk/sound/soc/soc-io.c b/trunk/sound/soc/soc-io.c index 39ba5070ff92..4d8dc6a27d4d 100644 --- a/trunk/sound/soc/soc-io.c +++ b/trunk/sound/soc/soc-io.c @@ -114,6 +114,7 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, enum snd_soc_control_type control) { struct regmap_config config; + int ret; memset(&config, 0, sizeof(config)); codec->write = hw_write; @@ -141,6 +142,11 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, case SND_SOC_REGMAP: /* Device has made its own regmap arrangements */ codec->using_regmap = true; + + ret = regmap_get_val_bytes(codec->control_data); + /* Errors are legitimate for non-integer byte multiples */ + if (ret > 0) + codec->val_bytes = ret; break; default: