Received: by 10.223.185.116 with SMTP id b49csp3579489wrg; Tue, 6 Mar 2018 01:12:42 -0800 (PST) X-Google-Smtp-Source: AG47ELu8FzJzKmHupo1bowMYdGB0aCORQkPC8jNkHKM+xsrn4APrmGp/dlArMSasn+CncVHUeofX X-Received: by 2002:a17:902:8e86:: with SMTP id bg6-v6mr16366385plb.113.1520327562343; Tue, 06 Mar 2018 01:12:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520327562; cv=none; d=google.com; s=arc-20160816; b=WjX1RFSnMkNE6M1Tufalwia8XB8d5l7IfnooaCFICOC3aW7uBxd0bmPnxUbVWzhPaN P+ZO1mL6UgThqTtMh4Lz4o81lMfHkaANAZWrPaH+//jxRyutdlEtzjrr63eZ/lWsQUBK aq94O1+N5pv77FbQrOHSFnEYdDuw4Qkq+cMFWcd5oGoRYGB68oTmYmHx/m223gQS02wK 3Qbt/qKfQL5h5RwujMawwcJQ9/satKOZo9tzG6f0ZngumEnIIvEDMMmOITnPgPxvB4Me +7LGfz8Avj0dVTBewZL5rxSW7G0MGjKL8Ox7K5nB2PNtfmrmqtc9fUOXrOUIZSBFiR0p Kvvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=L5GGZIsTH4Q4vzhJYF9LtbApHDJSf8jQdxudXwXFGrk=; b=oooV0Pi6S6jUPGdnPljKWXQfveWBqVSsPp6HPeuam61SaQ6iligCKL4STocM6rfJx1 ar23DVaFO+7cXvd4HVt2DRBMuwjh65W6nzCohrn/RYAqZ400P1iOjRuZ2mGC9coljC/V TrrV7sk5TCFhadBSna4uhBagQ99Lxidf0M7nfUjKSeF3LfG73AjSTQxw1WSHFo6FcE95 iEAQFWs0GlA0cwanCfqs0ZT6Xw5ZMl22hnsq7OWd27YNeBF2PS6G9WkUN94kmgJ/lYak eimzEYtTFHyEJ/LV03W0HpiQAn3Tl8iPmV5hriw/wUpTwczaHj2V7s2CEzXWMkvvAgC0 8x9Q== 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 s26si11762993pfg.264.2018.03.06.01.12.27; Tue, 06 Mar 2018 01:12:42 -0800 (PST) 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 S1753305AbeCFJKD (ORCPT + 99 others); Tue, 6 Mar 2018 04:10:03 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:21185 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753237AbeCFJKB (ORCPT ); Tue, 6 Mar 2018 04:10:01 -0500 X-UUID: c5ac2fea6cb546e7afea50c77dc41592-20180306 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 717958304; Tue, 06 Mar 2018 17:09:58 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 6 Mar 2018 17:09:57 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Tue, 6 Mar 2018 17:09:57 +0800 From: Ryder Lee To: Stephen Boyd , Rob Herring CC: Mark Brown , Lee Jones , Matthias Brugger , , , , , , Garlic Tseng , Ryder Lee Subject: [PATCH v4 2/6] clk: mediatek: add devm_of_platform_populate() for MT7622 audsys Date: Tue, 6 Mar 2018 17:09:27 +0800 Message-ID: <3a3c198707a69297abc05d2a7fef97857e7fab5a.1520327262.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c index 13f752d..0a1109f 100644 --- a/drivers/clk/mediatek/clk-mt7622-aud.c +++ b/drivers/clk/mediatek/clk-mt7622-aud.c @@ -142,6 +142,7 @@ static int clk_mt7622_audiosys_init(struct platform_device *pdev) { struct clk_onecell_data *clk_data; struct device_node *node = pdev->dev.of_node; + int r; clk_data = mtk_alloc_clk_data(CLK_AUDIO_NR_CLK); @@ -150,12 +151,15 @@ 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); - return r; + return r; + } + + return devm_of_platform_populate(&pdev->dev); } static const struct of_device_id of_match_clk_mt7622_aud[] = { -- 1.9.1