diff mbox series

pwm: rockchip: Use of_clk_get_parent_count()

Message ID 20190525115941.108309-1-wangkefeng.wang@huawei.com (mailing list archive)
State New, archived
Headers show
Series pwm: rockchip: Use of_clk_get_parent_count() | expand

Commit Message

Kefeng Wang May 25, 2019, 11:59 a.m. UTC
Use of_clk_get_parent_count() instead of open coding.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/pwm/pwm-rockchip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index 4d99d468df09..a0fbb9a139bd 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -329,8 +329,8 @@  static int rockchip_pwm_probe(struct platform_device *pdev)
 		}
 	}
 
-	count = of_count_phandle_with_args(pdev->dev.of_node,
-					   "clocks", "#clock-cells");
+	count = of_clk_get_parent_count(pdev->dev.of_node);
+
 	if (count == 2)
 		pc->pclk = devm_clk_get(&pdev->dev, "pclk");
 	else