From 5c46f43f08004d6d25772c9b6e24fa048c8c3efc Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 12 May 2014 11:22:25 -0500 Subject: clk: rockchip: fix function type for CLK_OF_DECLARE Adding function type checking to CLK_OF_DECLARE found a type mismatch with rk2928_gate_clk_init. The function only takes a single struct device_node parameter. Signed-off-by: Rob Herring Acked-by: Mike Turquette --- drivers/clk/rockchip/clk-rockchip.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/clk') diff --git a/drivers/clk/rockchip/clk-rockchip.c b/drivers/clk/rockchip/clk-rockchip.c index 967c141b1a20..4cf838d52ef6 100644 --- a/drivers/clk/rockchip/clk-rockchip.c +++ b/drivers/clk/rockchip/clk-rockchip.c @@ -24,8 +24,7 @@ static DEFINE_SPINLOCK(clk_lock); * Gate clocks */ -static void __init rk2928_gate_clk_init(struct device_node *node, - void *data) +static void __init rk2928_gate_clk_init(struct device_node *node) { struct clk_onecell_data *clk_data; const char *clk_parent; -- cgit v1.2.3-59-g8ed1b From cb7d5f425fd1c5f2295770c3ee36c950a0b6714b Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 12 May 2014 11:24:31 -0500 Subject: clk: sunxi: avoid double DT matching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use for_each_matching_node_and_match instead of for_each_matching_node plus of_match_node to avoid searching the DT twice for each node. The sunxi DT scanning code should really be re-worked rather than have its own private matching infrastructure. It is working around needing a function pointer and a data pointer for each compatible match. Signed-off-by: Rob Herring Cc: "Emilio López" Acked-by: Mike Turquette Cc: Maxime Ripard --- drivers/clk/sunxi/clk-sunxi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/clk') diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index bd7dc733c1ca..ef5e2d8096d8 100644 --- a/drivers/clk/sunxi/clk-sunxi.c +++ b/drivers/clk/sunxi/clk-sunxi.c @@ -1278,8 +1278,7 @@ static void __init of_sunxi_table_clock_setup(const struct of_device_id *clk_mat const struct of_device_id *match; void (*setup_function)(struct device_node *, const void *) = function; - for_each_matching_node(np, clk_match) { - match = of_match_node(clk_match, np); + for_each_matching_node_and_match(np, clk_match, &match) { data = match->data; setup_function(np, data); } -- cgit v1.2.3-59-g8ed1b From 83221923fc09c5ad3f1afbfb5d227a7ff1638b29 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 12 May 2014 11:32:28 -0500 Subject: clk: sunxi: fix function type for CLK_OF_DECLARE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding function type checking to CLK_OF_DECLARE found a type mismatch with sunxi_init_clocks. The function takes a single struct device_node parameter. Signed-off-by: Rob Herring Acked-by: Mike Turquette Cc: "Emilio López" Cc: Maxime Ripard --- drivers/clk/sunxi/clk-sunxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/clk') diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index ef5e2d8096d8..9eddf22d56a4 100644 --- a/drivers/clk/sunxi/clk-sunxi.c +++ b/drivers/clk/sunxi/clk-sunxi.c @@ -1309,7 +1309,7 @@ static void __init sunxi_clock_protect(void) } } -static void __init sunxi_init_clocks(void) +static void __init sunxi_init_clocks(struct device_node *np) { /* Register factor clocks */ of_sunxi_table_clock_setup(clk_factors_match, sunxi_factors_clk_setup); -- cgit v1.2.3-59-g8ed1b From 826d8958419ae924ae2af12d214ee599ee713e91 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 12 May 2014 11:41:19 -0500 Subject: clk: ti: add missing semi-colon on CLK_OF_DECLARE With common OF_DECLARE macros, a semi-colon will be required for CLK_OF_DECLARE. Add the missing semi-colon to ti,gate-clock. Signed-off-by: Rob Herring Acked-by: Mike Turquette --- drivers/clk/ti/gate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/clk') diff --git a/drivers/clk/ti/gate.c b/drivers/clk/ti/gate.c index 3e2999d11d15..58734817d502 100644 --- a/drivers/clk/ti/gate.c +++ b/drivers/clk/ti/gate.c @@ -221,7 +221,7 @@ static void __init of_ti_gate_clk_setup(struct device_node *node) { _of_ti_gate_clk_setup(node, &omap_gate_clk_ops, NULL); } -CLK_OF_DECLARE(ti_gate_clk, "ti,gate-clock", of_ti_gate_clk_setup) +CLK_OF_DECLARE(ti_gate_clk, "ti,gate-clock", of_ti_gate_clk_setup); static void __init of_ti_wait_gate_clk_setup(struct device_node *node) { -- cgit v1.2.3-59-g8ed1b