summaryrefslogtreecommitdiff
path: root/drivers/clk/mediatek
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2018-03-20 11:16:51 +0800
committerStephen Boyd <sboyd@kernel.org>2018-03-20 00:24:33 -0700
commit037b21133e5367c833908db0226d77138ba4c5eb (patch)
treeb53d911dbff707edfdc7514468b66512e4dcfa7b /drivers/clk/mediatek
parent9cb12501f38f924567ea7ba10041d32ecd7bf809 (diff)
clk: mediatek: add devm_of_platform_populate() for MT7622 audsys
Add devm_of_platform_populate() to populate devices which are children of the root node. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/mediatek')
-rw-r--r--drivers/clk/mediatek/clk-mt7622-aud.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
index 13f752de7adc..4f3d47b41b3e 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;
}