From patchwork Fri May 15 10:32:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 6413481 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A3D9FC0432 for ; Fri, 15 May 2015 10:34:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5BD1B20498 for ; Fri, 15 May 2015 10:34:32 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 0D2D520456 for ; Fri, 15 May 2015 10:34:31 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D8138266599; Fri, 15 May 2015 12:34:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 249E32664AB; Fri, 15 May 2015 12:33:18 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C213326606B; Fri, 15 May 2015 12:33:14 +0200 (CEST) Received: from smtp-out-168.synserver.de (smtp-out-168.synserver.de [212.40.185.168]) by alsa0.perex.cz (Postfix) with ESMTP id 01C7C266299 for ; Fri, 15 May 2015 12:33:05 +0200 (CEST) Received: (qmail 21711 invoked by uid 0); 15 May 2015 10:33:05 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 21546 Received: from ppp-188-174-110-9.dynamic.mnet-online.de (HELO lars-adi-laptop.fritz.box) [188.174.110.9] by 217.119.54.73 with SMTP; 15 May 2015 10:33:05 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Fri, 15 May 2015 12:32:56 +0200 Message-Id: <1431685980-6600-4-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1431685980-6600-1-git-send-email-lars@metafoo.de> References: <1431685980-6600-1-git-send-email-lars@metafoo.de> Cc: Vinod Koul , Peter Ujfalusi , alsa-devel@alsa-project.org, Lars-Peter Clausen , Jyri Sarha Subject: [alsa-devel] [PATCH 4/8] ASoC: tlv320aix31xx: Replace direct snd_soc_codec dapm field access X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm(). Signed-off-by: Lars-Peter Clausen --- sound/soc/codecs/tlv320aic31xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c index e629273..c4c960f 100644 --- a/sound/soc/codecs/tlv320aic31xx.c +++ b/sound/soc/codecs/tlv320aic31xx.c @@ -646,7 +646,7 @@ static int aic31xx_add_controls(struct snd_soc_codec *codec) static int aic31xx_add_widgets(struct snd_soc_codec *codec) { - struct snd_soc_dapm_context *dapm = &codec->dapm; + struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec); int ret = 0; @@ -1027,17 +1027,17 @@ static int aic31xx_set_bias_level(struct snd_soc_codec *codec, enum snd_soc_bias_level level) { dev_dbg(codec->dev, "## %s: %d -> %d\n", __func__, - codec->dapm.bias_level, level); + snd_soc_codec_get_bias_level(codec), level); switch (level) { case SND_SOC_BIAS_ON: break; case SND_SOC_BIAS_PREPARE: - if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) + if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_STANDBY) aic31xx_clk_on(codec); break; case SND_SOC_BIAS_STANDBY: - switch (codec->dapm.bias_level) { + switch (snd_soc_codec_get_bias_level(codec)) { case SND_SOC_BIAS_OFF: aic31xx_power_on(codec); break; @@ -1049,7 +1049,7 @@ static int aic31xx_set_bias_level(struct snd_soc_codec *codec, } break; case SND_SOC_BIAS_OFF: - if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) + if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_STANDBY) aic31xx_power_off(codec); break; }