From: Ryder Lee <ryder.lee@mediatek.com>
To: Stephen Boyd <sboyd@codeaurora.org>, Rob Herring <robh+dt@kernel.org>
Cc: Mark Brown <broonie@kernel.org>, Lee Jones <lee.jones@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
<linux-mediatek@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-clk@vger.kernel.org>,
Garlic Tseng <garlic.tseng@mediatek.com>,
Ryder Lee <ryder.lee@mediatek.com>
Subject: [PATCH v4 2/6] clk: mediatek: add devm_of_platform_populate() for MT7622 audsys
Date: Tue, 6 Mar 2018 17:09:27 +0800 [thread overview]
Message-ID: <3a3c198707a69297abc05d2a7fef97857e7fab5a.1520327262.git.ryder.lee@mediatek.com> (raw)
In-Reply-To: <cover.1520327262.git.ryder.lee@mediatek.com>
Add devm_of_platform_populate() to populate devices which are children
of the root node.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
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
next prev parent reply other threads:[~2018-03-06 9:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1520327262.git.ryder.lee@mediatek.com>
2018-03-06 9:09 ` [PATCH v4 1/6] clk: mediatek: update missing clock data " Ryder Lee
2018-03-19 20:41 ` Stephen Boyd
2018-03-06 9:09 ` Ryder Lee [this message]
2018-03-19 20:31 ` [PATCH v4 2/6] clk: mediatek: add devm_of_platform_populate() " Stephen Boyd
2018-03-06 9:09 ` [PATCH v4 3/6] clk: mediatek: add audsys support for MT2701 Ryder Lee
2018-03-19 20:31 ` Stephen Boyd
2018-03-20 6:38 ` Ryder Lee
2018-03-06 9:09 ` [PATCH v4 4/6] dt-bindings: clock: mediatek: update audsys documentation to adapt MFD device Ryder Lee
2018-03-19 20:41 ` Stephen Boyd
2018-03-06 9:09 ` [PATCH v4 5/6] dt-bindings: clock: mediatek: add audsys support for MT2701 Ryder Lee
2018-03-19 20:41 ` Stephen Boyd
2018-03-06 9:09 ` [PATCH v4 6/6] arm: dts: mediatek: modify audio related nodes for both MT2701 and MT7623 Ryder Lee
2018-04-17 14:26 ` Matthias Brugger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a3c198707a69297abc05d2a7fef97857e7fab5a.1520327262.git.ryder.lee@mediatek.com \
--to=ryder.lee@mediatek.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=garlic.tseng@mediatek.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®