Received: by 10.213.65.68 with SMTP id h4csp78296imn; Mon, 19 Mar 2018 20:19:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELtnPQjKgCj0pg4e1/kycKBPgRD7JBBBOpbFMuqabFkG1vECxVb6JDvdaOC5zzO6PBY2ElCw X-Received: by 10.99.123.19 with SMTP id w19mr10510579pgc.405.1521515944287; Mon, 19 Mar 2018 20:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521515944; cv=none; d=google.com; s=arc-20160816; b=scyqXsM6gEcTXckWWEW90DtBfPnUr4EuEUa8IuC7Phbgx3T6qXEyqkB6J9CE/Z+nmp G8dpIEkAAuOU0R0LApQSVrmNfHElMxvHfrsWb0N5Qm4xZJtUUswYUobhjimnsbNL8Q/c +y9olhUENCMPvuVxDFMYy46YJZwYgfJktMpPcbKVRU5UFmZga5yMrvLAJZEwZqb2tipJ Wb7Acx5m5rXCJ7Pe5fB1lEQcarAQ6yprE5zvsJrYU6GFZX2pfGHCbvx4YoIyu95NaDKX vsQJ2VeV8IWdXBf7EdvYatM6Ou8SdZ/8Re3SMypiHUZnMr7pCuLKssiock96YJ3GXT2R 4x2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=UAWsxOJHpRpDFKNSyrtCb0CMdUo1rcejanE+t3nhDPQ=; b=is50nQELZqYxh09/GcR2Uugg+/8pSvrbEFqsLMTQm7fXdRLW/zasXpB/EBuo4936TX pjPmyBwUPD+y/WnWfmQkbLchS7gpRkklTVxF1guo+o1rLRj7gSfGm6j28orDnYgv00XZ GVHoXyVaolTBUgm7F2TgcsyoJwlH2K6IQFeugDbQAyjjAHApd/u2YIga4YvWhcmiepOQ Pq9QcChuWJmS+JndgFmW4JXCyywY4ow5bcoxpFqirJ7pTK46P2Db7aa/QFNZo7qWKvQz MPAKehqjdyT8HhENmvWUuI4fc1JLXE8BEG6wuE3riSQqAkcdUGk72534rZM6jGxIRpiS 1Ndw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12-v6si668227pll.498.2018.03.19.20.18.50; Mon, 19 Mar 2018 20:19:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751903AbeCTDRW (ORCPT + 99 others); Mon, 19 Mar 2018 23:17:22 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:11616 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751531AbeCTDRR (ORCPT ); Mon, 19 Mar 2018 23:17:17 -0400 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 CC: Matthias Brugger , , , , , "Garlic Tseng" , Ryder Lee 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 Content-Type: text/plain 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 1.9.1