From patchwork Tue Mar 20 03:16:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 10296205 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 1E136602B3 for ; Tue, 20 Mar 2018 03:18:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E06E292D3 for ; Tue, 20 Mar 2018 03:18:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0293D292DE; Tue, 20 Mar 2018 03:18:08 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B92C8292D3 for ; Tue, 20 Mar 2018 03:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+GRT9Bc5DyGaQYDeB+9BHOJzGuzaJfKS9ikJ934yk8Y=; b=e+GfbYaziwABDw w5WPX0wfnxWeyJ422MbEFi43fmL811g76j4chC/QqIxCZocx4F2ALGEje4CDiKWKMmBhDL8G8RyPy aPCXpmRMZO4j2u8nSZk6MXb34z+78vouxmNdi/9wwHumKll7TL8SO9O3DVmlGJEpCl8ZZ2U+JdJKe JdocVMTDmg7skfGjCTLAhqf5dhQiZz5HLwjMS5avJh2QkIELwq3fq2ej583gzJZ20EZzP0quVPww9 C19haGT1pkovkP6DsTg5uPiucODJe7yVhw6D945f+iFMLS/8Q+En17awOrLX4Byiw8mWEu4maFhUr LMva3BHzcfYONYezCNsw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ey7ml-0007oU-0K; Tue, 20 Mar 2018 03:18:03 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ey7mH-0007gl-LW; Tue, 20 Mar 2018 03:17:57 +0000 X-UUID: e913793e7aae49efb1c3693b39ffcdd5-20180320 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1480274287; Tue, 20 Mar 2018 11:17:14 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 20 Mar 2018 11:17:12 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Tue, 20 Mar 2018 11:17:12 +0800 From: Ryder Lee To: Stephen Boyd Subject: [PATCH 1/2] clk: mediatek: add devm_of_platform_populate() for MT7622 audsys Date: Tue, 20 Mar 2018 11:16:51 +0800 Message-ID: <004f07aef08148321c320ea09f8169982f73dd2b.1521514928.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-12.5.0.5042-8.2.9001-23730.000 X-TM-AS-Result: No-1.558400-8.000000-10 X-TMASE-MatchedRID: LS8Ewxiu6UdYXTxImR5ZvLCvlllU7Dl1cx5k3wffojNcU0dNErOD+vlY oV6p/cSxwX0f1lPumDhPaUktJ/9D+gzyMxeMEX6wFEUknJ/kEl7dB/CxWTRRu+rAZ8KTspSz1xb LpYhisWb7RSSklMGgRFUMLsel7LEZwLTUp9XMgjaqyJlLmwvDaJklDFIDEmydacc1Uwk2T+nCpq Uiw84oCHIhCr7FuKoLD1y8R38S3l1URzkirO0Q1F5h9KQWrq4BvuMTr7CQJJ5+3BndfXUhXQ== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.558400-8.000000 X-TMASE-Version: SMEX-12.5.0.5042-8.2.9001-23730.000 X-TMASE-POSTMAN: 2-d; X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180319_201755_748497_74A9F154 X-CRM114-Status: GOOD ( 10.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ryder Lee , Garlic Tseng , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add devm_of_platform_populate() to populate devices which are children of the root node. Signed-off-by: Ryder Lee --- drivers/clk/mediatek/clk-mt7622-aud.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c index 13f752d..4f3d47b 100644 --- a/drivers/clk/mediatek/clk-mt7622-aud.c +++ b/drivers/clk/mediatek/clk-mt7622-aud.c @@ -150,11 +150,23 @@ static int clk_mt7622_audiosys_init(struct platform_device *pdev) clk_data); r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); - if (r) + if (r) { dev_err(&pdev->dev, "could not register clock provider: %s: %d\n", pdev->name, r); + goto err_clk_provider; + } + + r = devm_of_platform_populate(&pdev->dev); + if (r) + goto err_plat_populate; + + return 0; + +err_plat_populate: + of_clk_del_provider(node); +err_clk_provider: return r; }