From: Mark Brown Subject: [PATCH 2/8] ASoC: Use standard snd_soc_cache_sync() for WM9090 Date: Wed, 14 Dec 2011 17:00:48 +0800 Message-ID: <1323853254-9020-2-git-send-email-broonie@opensource.wolfsonmicro.com> References: <1323853254-9020-1-git-send-email-broonie@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from opensource.wolfsonmicro.com (opensource.wolfsonmicro.com [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id E09862439C for ; Wed, 14 Dec 2011 10:01:08 +0100 (CET) In-Reply-To: <1323853254-9020-1-git-send-email-broonie@opensource.wolfsonmicro.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Liam Girdwood Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, Mark Brown List-Id: alsa-devel@alsa-project.org Signed-off-by: Mark Brown --- sound/soc/codecs/wm9090.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c index d1d2c70..41ebe0d 100644 --- a/sound/soc/codecs/wm9090.c +++ b/sound/soc/codecs/wm9090.c @@ -513,18 +513,7 @@ static int wm9090_set_bias_level(struct snd_soc_codec *codec, case SND_SOC_BIAS_STANDBY: if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { /* Restore the register cache */ - for (i = 1; i < codec->driver->reg_cache_size; i++) { - if (reg_cache[i] == wm9090_reg_defaults[i]) - continue; - if (wm9090_volatile(codec, i)) - continue; - - ret = snd_soc_write(codec, i, reg_cache[i]); - if (ret != 0) - dev_warn(codec->dev, - "Failed to restore register %d: %d\n", - i, ret); - } + snd_soc_cache_sync(codec); } /* We keep VMID off during standby since the combination of -- 1.7.7.3