From patchwork Wed Mar 14 16:41:15 2018 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: 10282721 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1261E6063E for ; Wed, 14 Mar 2018 16:41:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 031F428478 for ; Wed, 14 Mar 2018 16:41:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBC5B2847D; Wed, 14 Mar 2018 16:41:46 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 89E8128478 for ; Wed, 14 Mar 2018 16:41:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751452AbeCNQlp (ORCPT ); Wed, 14 Mar 2018 12:41:45 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:18273 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbeCNQlo (ORCPT ); Wed, 14 Mar 2018 12:41:44 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20180314164142epoutp038db098d16a9983491cb4b375b16c8585~b1wIDmiKO0045300453epoutp03n; Wed, 14 Mar 2018 16:41:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20180314164142epoutp038db098d16a9983491cb4b375b16c8585~b1wIDmiKO0045300453epoutp03n DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1521045702; bh=5khUmmX18gqbPk64+XHR1OI+uaHmq26G4dEMzrdZmp4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=izYZe2ecyvEfzDX0fYF2v8Ohc0FfVWm+kah9JTOQJSd4QylLAbBBIRXgow8SC9EXS OYoOpQHBPG9LJU9rUySFete42p83cpVmeppHcWBpYkox90SCfnXd+9uljAF8KfiOJX 5ququ/4R07ngmxUhAjEts7UfWgqe0O+eLgkIsMys= Received: from epsmges1p3.samsung.com (unknown [182.195.42.55]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180314164142epcas1p2bc2d4ff4eec21b1d9db834d10f858b69~b1wHp0C_o3112431124epcas1p2Z; Wed, 14 Mar 2018 16:41:42 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 3E.6E.04137.6C059AA5; Thu, 15 Mar 2018 01:41:42 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180314164141epcas1p43edb2d21ad8818f744b2e11009322996~b1wHQVR_X0402404024epcas1p4e; Wed, 14 Mar 2018 16:41:41 +0000 (GMT) X-AuditID: b6c32a37-433ff70000001029-34-5aa950c634c4 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id ED.69.03826.5C059AA5; Thu, 15 Mar 2018 01:41:41 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P5L00M6VACUIH60@mmp1.samsung.com>; Thu, 15 Mar 2018 01:41:41 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Cc: lgirdwood@gmail.com, krzk@kernel.org, sbkim73@samsung.com, alsa-devel@alsa-project.org, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, m.szyprowski@samsung.com, Sylwester Nawrocki Subject: [PATCH 3/5] ASoC: samsung: Use snd_soc_of_put_dai_link_codecs() in odroid.c Date: Wed, 14 Mar 2018 17:41:15 +0100 Message-id: <20180314164115.22736-3-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.14.2 In-reply-to: <20180314164115.22736-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCIsWRmVeSWpSXmKPExsWy7bCmvu6xgJVRBkcPClhcuXiIyWLjjPWs FlMfPmGzmH/kHKvF+fMb2C2+Xelgsphxfh+Txdojd9ktWvceYbc4/Kad1eLiii9MDtweGz43 sXnsnHWX3WPTqk42j74tqxg9Pm+SC2CN4rJJSc3JLEst0rdL4MpYvKaVuWAHT8WVgxfYGxiP cnUxcnJICJhIHJu8mbWLkYtDSGAHo8StSeeZIJzvjBI//v9khan62PuIGSKxm1Hi0dZ5jBDO L0aJbwcXsIBUsQkYSvQe7WMEsUUExCRuz+lkBrGZBaYwSTx4nNrFyMEhLBAmcex6BEiYRUBV 4vbrL0wgYV4Ba4lt3+ogdslLvF9wH2wKp4CNROe10+wQ8RVsEnOmekHYLhL7ti9hg7CFJV4d 38IOMkZCQFri0lFbiHC1RGdbFzvIlRICLYwSf6Zdgqq3ljh8/CIrxGV8Eu++9rBC9PJKdLQJ QZR4SJz4t58RwnaUmL4cYpWQQD+jxLkvBRMYpRYwMqxiFEstKM5NTy02LDDWK07MLS7NS9dL zs/dxAiOWy3zHYwbzvkcYhTgYFTi4TVQWxklxJpYVlyZe4hRgoNZSYR3jzVQiDclsbIqtSg/ vqg0J7X4EKM0B4uSOG9AgEuUkEB6YklqdmpqQWoRTJaJg1OqgbGDd3qbAOfco8GehxZ7JVy3 DiwXfamdUHT9fo8Jb0Pw1cIYfePbIVnsTx7V76netfSE7tZFnfOal7xm4PjwulSuuCvpSPHP Fps6+2OXPyydEXWcvchs5u/MCVOmW3m16huGJNaG91gW/nxbpdF2frLWx623OALFBLZ+vFf8 1+XmkeaJMarnpZRYijMSDbWYi4oTARL4qsrXAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHLMWRmVeSWpSXmKPExsVy+t9jAd2jASujDL50m1lcuXiIyWLjjPWs FlMfPmGzmH/kHKvF+fMb2C2+Xelgsphxfh+Txdojd9ktWvceYbc4/Kad1eLiii9MDtweGz43 sXnsnHWX3WPTqk42j74tqxg9Pm+SC2CN4rJJSc3JLEst0rdL4MpYvKaVuWAHT8WVgxfYGxiP cnUxcnJICJhIfOx9xNzFyMUhJLCTUaLtWxs7hPOLUeJs8xI2kCo2AUOJ3qN9jCC2iICYxO05 nWAdzAJTmCR+z3kMlODgEBYIkzh2PQKkhkVAVeL26y9MIGFeAWuJbd/qIJbJS7xfcB9sDKeA jUTntdPsICVCQCVXr2ZNYORZwMiwilEytaA4Nz232KjAMC+1XK84Mbe4NC9dLzk/dxMjMNS2 Hdbq28F4f0n8IUYBDkYlHt4byiujhFgTy4orcw8xSnAwK4nw7rEGCvGmJFZWpRblxxeV5qQW H2KU5mBREue9nXcsUkggPbEkNTs1tSC1CCbLxMEp1cA4QeLX7e6vU8XSp7ybmuzHLvHNvvvO jKULA9cqxq2+ePvhlxnVBULmLou6psY28m5wr+otvS23/0u1WHRV9HJxFrM+vn3NM5e98J/8 7eVJ4SNhDbEFa3PnJ/z9O53VbaJj2jJl9zvbWDZyLp8iUJb0Q4TPaVL38xkTm8wE1JoOeRjW LI5ZuKdYiaU4I9FQi7moOBEAuulEvjECAAA= X-CMS-MailID: 20180314164141epcas1p43edb2d21ad8818f744b2e11009322996 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180314164141epcas1p43edb2d21ad8818f744b2e11009322996 X-RootMTR: 20180314164141epcas1p43edb2d21ad8818f744b2e11009322996 References: <20180314164115.22736-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 Now when a helper for unreferencing device nodes is available we can get rid of the local implementation. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/odroid.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index e1b59457a327..e7b371b07230 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -91,18 +91,6 @@ static const struct snd_soc_ops odroid_card_ops = { .hw_params = odroid_card_hw_params, }; -static void odroid_put_codec_of_nodes(struct snd_soc_dai_link *link) -{ - struct snd_soc_dai_link_component *component = link->codecs; - int i; - - for (i = 0; i < link->num_codecs; i++, component++) { - if (!component->of_node) - break; - of_node_put(component->of_node); - } -} - static int odroid_audio_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -197,7 +185,7 @@ static int odroid_audio_probe(struct platform_device *pdev) err_put_i2s_n: of_node_put(link->cpu_of_node); err_put_codec_n: - odroid_put_codec_of_nodes(link); + snd_soc_of_put_dai_link_codecs(link); return ret; } @@ -206,7 +194,7 @@ static int odroid_audio_remove(struct platform_device *pdev) struct odroid_priv *priv = platform_get_drvdata(pdev); of_node_put(priv->dai_link.cpu_of_node); - odroid_put_codec_of_nodes(&priv->dai_link); + snd_soc_of_put_dai_link_codecs(&priv->dai_link); clk_put(priv->sclk_i2s); clk_put(priv->clk_i2s_bus);