From patchwork Tue Feb 12 18:03:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10808475 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 907D513BF for ; Tue, 12 Feb 2019 18:06:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F6F92C361 for ; Tue, 12 Feb 2019 18:06:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73C4F2C3B4; Tue, 12 Feb 2019 18:06:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F4792C361 for ; Tue, 12 Feb 2019 18:06:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731860AbfBLSFk (ORCPT ); Tue, 12 Feb 2019 13:05:40 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:22604 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731753AbfBLSFj (ORCPT ); Tue, 12 Feb 2019 13:05:39 -0500 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190212180537epoutp0270aef4850bdaeb1cce9fc0fef463719f~CsABWLz3f2787127871epoutp02-; Tue, 12 Feb 2019 18:05:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190212180537epoutp0270aef4850bdaeb1cce9fc0fef463719f~CsABWLz3f2787127871epoutp02- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1549994737; bh=blD4+7SyDmxtJMKEV1R1vNYt2wsMfDaSTYSU/TfWmdk=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=dYVzpPmlnBjO6vYSWBhPeEuFmI0bN8mwHReChieDonTLYezo4VK1BKyibl1QEvtyQ tX9DqTIu3ZUsCtQx86CQgroYVg46nLQDBA1xl2coXX5IXMbiPcBvHqAEIjeDm7uUHE n8I5JrOaz5b+gqcClrLaheegsnbZ/IFCaGJ2rQCM= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20190212180536epcas2p34d5dfe439312cc1bc5924ddad3ab30cc~CsAAUNf6w2872928729epcas2p3k; Tue, 12 Feb 2019 18:05:36 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 70.2D.04093.0FA036C5; Wed, 13 Feb 2019 03:05:36 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20190212180535epcas2p3aaa1c3d8fd9fcfb5a30bc6d132aba70a~Cr--zvoAS1117711177epcas2p3N; Tue, 12 Feb 2019 18:05:35 +0000 (GMT) X-AuditID: b6c32a48-18bff70000000ffd-0d-5c630af057d5 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id EB.30.03689.FEA036C5; Wed, 13 Feb 2019 03:05:35 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PMT0024XRJ2FB10@mmp2.samsung.com>; Wed, 13 Feb 2019 03:05:35 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Cc: lgirdwood@gmail.com, krzk@kernel.org, sbkim73@samsung.com, m.szyprowski@samsung.com, b.zolnierkie@samsung.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH v2 16/21] ASoC: samsung: i2s: Simplify pri_dai, sec_dai pointers usage Date: Tue, 12 Feb 2019 19:03:37 +0100 Message-id: <20190212180342.32040-17-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.20.1 In-reply-to: <20190212180342.32040-1-s.nawrocki@samsung.com> MIME-version: 1.0 Content-transfer-encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNIsWRmVeSWpSXmKPExsWy7bCmhe4HruQYg7O3WS2uXDzEZLFxxnpW i6kPn7BZnD+/gd3i25UOJovLu+awWcw4v4/JYu2Ru+wWh9+0s1pcXPGFyYHLY8PnJjaPnbPu sntsWtXJ5tG3ZRWjx+dNcgGsUVw2Kak5mWWpRfp2CVwZhw6sYilYy1Wxe+pk1gbGDRxdjBwc EgImEhcehHYxcnEICexglOjf38gO4XxnlPh+uJ+li5ETrKh353yoxAZGiVMXz7NBOL8YJXq3 3GMCqWITMJToPdrHCGKLCIhJ3J7TyQxSxCzQwiQxZ+5SZpCEsECExP5v98EaWARUJfavn8cI cgevgI1E7/lyiG3yEud717GD2JxA4WcLv4FdwSsgKPFj8j0wmxmo5uCV5ywg8yUEjrBJdM9r YoRodpF407AL6mxpiWerNkLFqyV2be9mhmjoYJRoubCdGSJhLXH4+EVWiKl8Eh2H/7JDAoZX oqNNCKLEQ6Lj0QJGiI/7GSUOr25mnsAoNQvJUbOQHLWAkWkVo1hqQXFuemqxUYGJXnFibnFp Xrpecn7uJkZwlGt57GA8cM7nEKMAB6MSD++Ko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cUaioRZzUXEiAKhXLIVdAgAA X-CMS-MailID: 20190212180535epcas2p3aaa1c3d8fd9fcfb5a30bc6d132aba70a CMS-TYPE: 102P X-CMS-RootMailID: 20190212180535epcas2p3aaa1c3d8fd9fcfb5a30bc6d132aba70a References: <20190212180342.32040-1-s.nawrocki@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the probe call is on the primary DAI we can use 'other' in place of i2s->sec_dai, if the probe call is on the secondary DAI we can use 'i2s' in place of other->sec_dai. While at it fix one whitespace issue. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/i2s.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index f438558c4d21..097c641fc1b9 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1057,18 +1057,17 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) pm_runtime_get_sync(dai->dev); if (is_secondary(i2s)) { /* If this is probe on the secondary DAI */ - snd_soc_dai_init_dma_data(dai, &other->sec_dai->dma_playback, - NULL); + snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, NULL); } else { snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, - &i2s->dma_capture); + &i2s->dma_capture); if (priv->quirks & QUIRK_NEED_RSTCLR) writel(CON_RSTCLR, priv->addr + I2SCON); if (priv->quirks & QUIRK_SUPPORTS_IDMA) idma_reg_addr_init(priv->addr, - i2s->sec_dai->idma_playback.addr); + other->idma_playback.addr); } /* Reset any constraint on RFS and BFS */