diff options
author | Shawn Lin <shawn.lin@rock-chips.com> | 2016-03-12 11:25:53 -0500 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2016-03-27 07:03:35 -0400 |
commit | ff1ae209617cb31a5297bd103709d6b9e2db77d2 (patch) | |
tree | f78cc97b8db8159e4b09bb7e5fbc4171a6fcc721 | |
parent | 2af2544d60f007277a98f66391a521ec377a6a67 (diff) |
clk: rockchip: remove redundant checking of device_node
rockchip_clk_of_add_provider is used by sub-clk driver which
already call of_iomap before calling it. If device_node does
not exist, of_iomap returns NULL which will fail to init the
sub-clk driver. So really it's redundant.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
-rw-r--r-- | drivers/clk/rockchip/clk.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c index 5618a8761dee..277f9270bf72 100644 --- a/drivers/clk/rockchip/clk.c +++ b/drivers/clk/rockchip/clk.c | |||
@@ -359,11 +359,9 @@ err_free: | |||
359 | void __init rockchip_clk_of_add_provider(struct device_node *np, | 359 | void __init rockchip_clk_of_add_provider(struct device_node *np, |
360 | struct rockchip_clk_provider *ctx) | 360 | struct rockchip_clk_provider *ctx) |
361 | { | 361 | { |
362 | if (np) { | 362 | if (of_clk_add_provider(np, of_clk_src_onecell_get, |
363 | if (of_clk_add_provider(np, of_clk_src_onecell_get, | 363 | &ctx->clk_data)) |
364 | &ctx->clk_data)) | 364 | pr_err("%s: could not register clk provider\n", __func__); |
365 | pr_err("%s: could not register clk provider\n", __func__); | ||
366 | } | ||
367 | } | 365 | } |
368 | 366 | ||
369 | struct regmap *rockchip_clk_get_grf(struct rockchip_clk_provider *ctx) | 367 | struct regmap *rockchip_clk_get_grf(struct rockchip_clk_provider *ctx) |