diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2019-05-27 20:05:35 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-05-28 19:38:47 +0200 |
commit | 7e186d9de9290d57c90751ea252135f425f49e6e (patch) | |
tree | 565871b9b97d464271bb05a20e5812689d719252 /drivers/base/power | |
parent | cd6c84d8f0cdc911df435bb075ba22ce3c605b07 (diff) | |
download | linux-7e186d9de9290d57c90751ea252135f425f49e6e.tar.bz2 |
drivers: base: power: clock_ops: Use of_clk_get_parent_count()
Use of_clk_get_parent_count() instead of open coding.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power')
-rw-r--r-- | drivers/base/power/clock_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index 59d19dd64928..3e84e3085d43 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c @@ -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; |