clk: samsung: exynos5433: Use of_clk_get_parent_count()

Use of_clk_get_parent_count() instead of open coding.

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
This commit is contained in:
Kefeng Wang 2019-05-25 19:55:42 +08:00 committed by Sylwester Nawrocki
parent a188339ca5
commit c304b8d2f9
1 changed files with 2 additions and 2 deletions

View File

@ -5590,8 +5590,8 @@ static int __init exynos5433_cmu_probe(struct platform_device *pdev)
data->nr_clk_save = info->nr_clk_regs;
data->clk_suspend = info->suspend_regs;
data->nr_clk_suspend = info->nr_suspend_regs;
data->nr_pclks = of_count_phandle_with_args(dev->of_node, "clocks",
"#clock-cells");
data->nr_pclks = of_clk_get_parent_count(dev->of_node);
if (data->nr_pclks > 0) {
data->pclks = devm_kcalloc(dev, sizeof(struct clk *),
data->nr_pclks, GFP_KERNEL);