From 8dfb4a28f5645874d9b47cffe44055a3a71ca78b Mon Sep 17 00:00:00 2001
From: Jacob Chen <jacob2.chen@rock-chips.com>
Date: Tue, 27 Sep 2016 15:48:45 +0800
Subject: [PATCH] clk: rk3399: fix rockchip_get_cru

clk_rk3399 is driver name, not device name

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
 drivers/clk/rockchip/clk_rk3399.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index ea0ce2aab1..8efb892606 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -786,7 +786,9 @@ void *rockchip_get_cru(void)
 	fdt_addr_t *addr;
 	int ret;
 
-	ret = uclass_get_device_by_name(UCLASS_CLK, "clk_rk3399", &dev);
+	ret = uclass_get_device_by_driver(UCLASS_CLK,
+			DM_GET_DRIVER(clk_rk3399), &dev);
+
 	if (ret)
 		return ERR_PTR(ret);
 
-- 
2.39.5