From patchwork Sun Jul 19 10:15:18 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: 6821731 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 6ED06C05AC for ; Sun, 19 Jul 2015 10:16:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A07CD20570 for ; Sun, 19 Jul 2015 10:16:47 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 71DCB2053B for ; Sun, 19 Jul 2015 10:16:46 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9BD06260590; Sun, 19 Jul 2015 12:16:44 +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, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 310A7260592; Sun, 19 Jul 2015 12:16:03 +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 1B60F260577; Sun, 19 Jul 2015 12:15:43 +0200 (CEST) Received: from smtp-out-068.synserver.de (smtp-out-068.synserver.de [212.40.185.68]) by alsa0.perex.cz (Postfix) with ESMTP id 49961260583 for ; Sun, 19 Jul 2015 12:15:29 +0200 (CEST) Received: (qmail 11981 invoked by uid 0); 19 Jul 2015 10:15:26 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 11774 Received: from ppp-188-174-127-204.dynamic.mnet-online.de (HELO lars-laptop.fritz.box) [188.174.127.204] by 217.119.54.81 with SMTP; 19 Jul 2015 10:15:25 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Sun, 19 Jul 2015 12:15:18 +0200 Message-Id: <1437300918-4612-2-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437300918-4612-1-git-send-email-lars@metafoo.de> References: <1437300918-4612-1-git-send-email-lars@metafoo.de> Cc: Brian Austin , Lars-Peter Clausen , alsa-devel@alsa-project.org, Paul Handrigan , Tim Howe Subject: [alsa-devel] [PATCH 2/2] ASoC: cs4349: Don't use rtd->codec 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 rtd->codec does not necessarily point to the CODEC instance for which the callback was called (e.g. for CODEC<->CODEC or multi-CODEC links). Use dai->codec instead. Signed-off-by: Lars-Peter Clausen --- sound/soc/codecs/cs4349.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c index db18799..5101278 100644 --- a/sound/soc/codecs/cs4349.c +++ b/sound/soc/codecs/cs4349.c @@ -94,8 +94,7 @@ static int cs4349_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_codec *codec = rtd->codec; + struct snd_soc_codec *codec = dai->codec; struct cs4349_private *cs4349 = snd_soc_codec_get_drvdata(codec); int mode, fmt, ret;