From patchwork Fri Apr 3 11:04:08 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: 6155941 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 4205ABF4A6 for ; Fri, 3 Apr 2015 11:05:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6448C203ED for ; Fri, 3 Apr 2015 11:05:25 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 25795203DA for ; Fri, 3 Apr 2015 11:05:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 61F182658D4; Fri, 3 Apr 2015 13:05:23 +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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 34EA3265862; Fri, 3 Apr 2015 13:04:30 +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 5FC22265888; Fri, 3 Apr 2015 13:04:28 +0200 (CEST) Received: from smtp-out-122.synserver.de (smtp-out-122.synserver.de [212.40.185.122]) by alsa0.perex.cz (Postfix) with ESMTP id 96D50265862 for ; Fri, 3 Apr 2015 13:04:18 +0200 (CEST) Received: (qmail 11767 invoked by uid 0); 3 Apr 2015 11:04:18 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 11619 Received: from ppp-88-217-83-222.dynamic.mnet-online.de (HELO lars-adi-laptop.fritz.box) [88.217.83.222] by 217.119.54.73 with SMTP; 3 Apr 2015 11:04:17 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Fri, 3 Apr 2015 13:04:08 +0200 Message-Id: <1428059048-32315-4-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1428059048-32315-1-git-send-email-lars@metafoo.de> References: <1428059048-32315-1-git-send-email-lars@metafoo.de> Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen , Lucas Stach , Anatol Pomozov , Stephen Warren Subject: [alsa-devel] [PATCH 4/4] ASoC: tegra_wm9712: Use card DAPM context to access widgets 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 will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context. Signed-off-by: Lars-Peter Clausen --- sound/soc/tegra/tegra_wm9712.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c index 2868b48..6492f81 100644 --- a/sound/soc/tegra/tegra_wm9712.c +++ b/sound/soc/tegra/tegra_wm9712.c @@ -46,11 +46,7 @@ static const struct snd_soc_dapm_widget tegra_wm9712_dapm_widgets[] = { static int tegra_wm9712_init(struct snd_soc_pcm_runtime *rtd) { - struct snd_soc_dai *codec_dai = rtd->codec_dai; - struct snd_soc_codec *codec = codec_dai->codec; - struct snd_soc_dapm_context *dapm = &codec->dapm; - - return snd_soc_dapm_force_enable_pin(dapm, "Mic Bias"); + return snd_soc_dapm_force_enable_pin(&rtd->card->dapm, "Mic Bias"); } static struct snd_soc_dai_link tegra_wm9712_dai = {