Commit 7e186d9d authored by Kefeng Wang's avatar Kefeng Wang Committed by Rafael J. Wysocki

drivers: base: power: clock_ops: Use of_clk_get_parent_count()

Use of_clk_get_parent_count() instead of open coding.
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent cd6c84d8
......@@ -12,6 +12,7 @@
#include <linux/pm_clock.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/of_clk.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/pm_domain.h>
......@@ -195,8 +196,7 @@ int of_pm_clk_add_clks(struct device *dev)
if (!dev || !dev->of_node)
return -EINVAL;
count = of_count_phandle_with_args(dev->of_node, "clocks",
"#clock-cells");
count = of_clk_get_parent_count(dev->of_node);
if (count <= 0)
return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment