From patchwork Mon May 19 09:41:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 4200681 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 877B7BEEAB for ; Mon, 19 May 2014 09:43:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7BA420221 for ; Mon, 19 May 2014 09:43:06 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6549820279 for ; Mon, 19 May 2014 09:43:05 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 591E426533F; Mon, 19 May 2014 11:43:04 +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 1119626524C; Mon, 19 May 2014 11:42:05 +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 B2B40265206; Mon, 19 May 2014 11:42:01 +0200 (CEST) Received: from smtp-out-145.synserver.de (smtp-out-051.synserver.de [212.40.185.51]) by alsa0.perex.cz (Postfix) with ESMTP id D8BF92650A9 for ; Mon, 19 May 2014 11:41:53 +0200 (CEST) Received: (qmail 22108 invoked by uid 0); 19 May 2014 09:41:53 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 21753 Received: from p4fe6056b.dip0.t-ipconnect.de (HELO lars-adi-laptop.analog.com) [79.230.5.107] by 217.119.54.77 with SMTP; 19 May 2014 09:41:53 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Mon, 19 May 2014 11:41:47 +0200 Message-Id: <1400492508-2732-3-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1400492508-2732-1-git-send-email-lars@metafoo.de> References: <1400492508-2732-1-git-send-email-lars@metafoo.de> Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen , Stephen Warren , Fabio Baltieri , Peter Ujfalusi , Jarkko Nikula Subject: [alsa-devel] [PATCH 3/4] ASoC: davinci-evm: Replace instances of rtd->codec->card with rtd->card 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 No need to go via the CODEC to get a pointer to the card. This will help to eventually remove the card field from the snd_soc_codec struct. Signed-off-by: Lars-Peter Clausen Acked-by: Peter Ujfalusi --- sound/soc/davinci/davinci-evm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c index cab98a5..a50010e 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c @@ -38,7 +38,7 @@ struct snd_soc_card_drvdata_davinci { static int evm_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_card *soc_card = rtd->codec->card; + struct snd_soc_card *soc_card = rtd->card; struct snd_soc_card_drvdata_davinci *drvdata = snd_soc_card_get_drvdata(soc_card); @@ -51,7 +51,7 @@ static int evm_startup(struct snd_pcm_substream *substream) static void evm_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_card *soc_card = rtd->codec->card; + struct snd_soc_card *soc_card = rtd->card; struct snd_soc_card_drvdata_davinci *drvdata = snd_soc_card_get_drvdata(soc_card); @@ -65,8 +65,7 @@ static int evm_hw_params(struct snd_pcm_substream *substream, struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_card *soc_card = codec->card; + struct snd_soc_card *soc_card = rtd->card; int ret = 0; unsigned sysclk = ((struct snd_soc_card_drvdata_davinci *) snd_soc_card_get_drvdata(soc_card))->sysclk; @@ -125,7 +124,7 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; struct snd_soc_codec *codec = rtd->codec; - struct device_node *np = codec->card->dev->of_node; + struct device_node *np = card->dev->of_node; int ret; /* Add davinci-evm specific widgets */