[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190525120155.108948-1-wangkefeng.wang@huawei.com>
Date: Sat, 25 May 2019 20:01:55 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <len.brown@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: [PATCH] drivers: base: power: Use of_clk_get_parent_count()
Use of_clk_get_parent_count() instead of open coding.
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
---
drivers/base/power/clock_ops.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
index 59d19dd64928..9c7e83267eac 100644
--- a/drivers/base/power/clock_ops.c
+++ b/drivers/base/power/clock_ops.c
@@ -195,8 +195,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;
--
2.20.1
Powered by blists - more mailing lists