Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: rockchip: rk3288: Drop CLK_NR_CLKS usage

In order to get rid of CLK_NR_CLKS and be able to drop it from the
bindings, use rockchip_clk_find_max_clk_id helper to find the highest
clock id.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/af141286-7994-4e3f-93e2-6ee4e718ef8a@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

authored by

Johan Jonker and committed by
Heiko Stuebner
545b1313 819b2e19

+4 -1
+4 -1
drivers/clk/rockchip/clk-rk3288.c
··· 932 932 enum rk3288_variant soc) 933 933 { 934 934 struct rockchip_clk_provider *ctx; 935 + unsigned long clk_nr_clks; 935 936 936 937 rk3288_cru_base = of_iomap(np, 0); 937 938 if (!rk3288_cru_base) { ··· 940 939 return; 941 940 } 942 941 943 - ctx = rockchip_clk_init(np, rk3288_cru_base, CLK_NR_CLKS); 942 + clk_nr_clks = rockchip_clk_find_max_clk_id(rk3288_clk_branches, 943 + ARRAY_SIZE(rk3288_clk_branches)) + 1; 944 + ctx = rockchip_clk_init(np, rk3288_cru_base, clk_nr_clks); 944 945 if (IS_ERR(ctx)) { 945 946 pr_err("%s: rockchip clk init failed\n", __func__); 946 947 iounmap(rk3288_cru_base);