From patchwork Mon Dec 1 06:52:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Hsu X-Patchwork-Id: 41750 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 26285240CF for ; Mon, 1 Dec 2014 06:52:50 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id n15sf6060913lbi.8 for ; Sun, 30 Nov 2014 22:52:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=nGPzuKUf9EFk/V7PB1n+AXqmilY/zGbBEkqygzYSB8M=; b=L2bbg+WbxjetHxJ17fJPqjmzPC85tkVyBQcNijWP7Rdf5dPGE1uUNr8abn+DBPe3az lxxGpCStGeFIDWNK1ZjQRIfFC3WKprm4V/cWcSBmgFcX9lMNRE1AIOq2A5BbBOKrwbRS Ho4/2PQ0p3kB3vQTezSRwsd7sPu83gfM/IYb9+J82fXwvzotGArjxp3xAJDWFkPxm5t7 +cotR+6yXfz1JYABvMRja+Nh0PNCnnFkXPhHD5JHsMGfdNT6pgFbDmjcXTaFsW+bjECP DwMC+Nj/UlDaYZtGP5PUtOHNLkLpvE/ALdmijD32RwPkbH1NYlMfB8herH3DewE1ohxU b9gA== X-Gm-Message-State: ALoCoQlOTI4b2lPDJwBUgMi9KvnKOKhej8AonL2Z2PjOVD0gPxTNMFyfRouL552Gsu/rbF1y3dGn X-Received: by 10.112.53.39 with SMTP id y7mr294489lbo.8.1417416769144; Sun, 30 Nov 2014 22:52:49 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.72 with SMTP id j8ls885813lag.105.gmail; Sun, 30 Nov 2014 22:52:48 -0800 (PST) X-Received: by 10.112.189.10 with SMTP id ge10mr54441614lbc.23.1417416768757; Sun, 30 Nov 2014 22:52:48 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id 9si16763462lar.40.2014.11.30.22.52.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Nov 2014 22:52:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id s18so8275929lam.29 for ; Sun, 30 Nov 2014 22:52:48 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr54362008lbc.66.1417416768655; Sun, 30 Nov 2014 22:52:48 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp236483lbc; Sun, 30 Nov 2014 22:52:47 -0800 (PST) X-Received: by 10.68.211.135 with SMTP id nc7mr98041429pbc.44.1417416761061; Sun, 30 Nov 2014 22:52:41 -0800 (PST) Received: from Kraken ([124.219.7.128]) by mx.google.com with ESMTP id gy3si27574778pac.10.2014.11.30.22.52.39 for ; Sun, 30 Nov 2014 22:52:41 -0800 (PST) Received-SPF: temperror (google.com: error in processing during lookup of xavier@kraken: DNS timeout) client-ip=124.219.7.128; Received: by Kraken (Postfix, from userid 1011) id BEBC96A2A51; Mon, 1 Dec 2014 14:52:15 +0800 (CST) From: Xavier Hsu To: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, patches@linaro.org Cc: lars@metafoo.de, ckeepax@opensource.wolfsonmicro.com, Xavier Hsu , Andy Green Subject: [PATCHv6 8/9] ASOC: wm8971: use regcache_sync to replace snd_soc_cache_sync Date: Mon, 1 Dec 2014 14:52:00 +0800 Message-Id: <1417416721-17271-8-git-send-email-xavier.hsu@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1417416721-17271-1-git-send-email-xavier.hsu@linaro.org> References: <1417416721-17271-1-git-send-email-xavier.hsu@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: xavier.hsu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Xavier Hsu Signed-off-by: Andy Green --- sound/soc/codecs/wm8971.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c index 60139bc..b2641a6 100755 --- a/sound/soc/codecs/wm8971.c +++ b/sound/soc/codecs/wm8971.c @@ -38,6 +38,7 @@ /* codec private data */ struct wm8971_priv { + struct regmap *regmap; /* MCLK */ unsigned int sysclk; struct snd_pcm_hw_constraint_list *sysclk_constraints; @@ -721,6 +722,7 @@ static int wm8971_mute(struct snd_soc_dai *dai, int mute) static int wm8971_set_bias_level(struct snd_soc_codec *codec, enum snd_soc_bias_level level) { + struct wm8971_priv *wm8971 = snd_soc_codec_get_drvdata(codec); u16 pwr_reg = snd_soc_read(codec, WM8971_PWR1) & 0xfe3e; switch (level) { @@ -732,7 +734,7 @@ static int wm8971_set_bias_level(struct snd_soc_codec *codec, break; case SND_SOC_BIAS_STANDBY: if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) - snd_soc_cache_sync(codec); + regcache_sync(wm8971->regmap); /* mute dac and set vmid to 500k, enable VREF */ snd_soc_write(codec, WM8971_PWR1, pwr_reg | 0x0140); @@ -866,7 +868,6 @@ static int wm8971_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct wm8971_priv *wm8971; - struct regmap *regmap; int ret; wm8971 = devm_kzalloc(&i2c->dev, sizeof(struct wm8971_priv), @@ -876,9 +877,9 @@ static int wm8971_i2c_probe(struct i2c_client *i2c, mutex_init(&wm8971->deemph_mutex); - regmap = devm_regmap_init_i2c(i2c, &wm8971_regmap); - if (IS_ERR(regmap)) - return PTR_ERR(regmap); + wm8971->regmap = devm_regmap_init_i2c(i2c, &wm8971_regmap); + if (IS_ERR(wm8971->regmap)) + return PTR_ERR(wm8971->regmap); i2c_set_clientdata(i2c, wm8971);