From 8c1b1e54faed690261752afcba27c79ce4d3fa10 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Fri, 19 Feb 2016 17:29:17 -0800 Subject: clk: at91: Remove impossible checks for of_clk_get_parent_count() These checks for < 0 are impossible now that of_clk_get_parent_count() returns an unsigned int. Change the checks for == 0 and update the type. Cc: Boris Brezillon Signed-off-by: Stephen Boyd --- drivers/clk/at91/clk-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/clk/at91/clk-main.c') diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c index fd7247deabdc..b85f43529396 100644 --- a/drivers/clk/at91/clk-main.c +++ b/drivers/clk/at91/clk-main.c @@ -611,12 +611,12 @@ void __init of_at91sam9x5_clk_main_setup(struct device_node *np, { struct clk *clk; const char *parent_names[2]; - int num_parents; + unsigned int num_parents; unsigned int irq; const char *name = np->name; num_parents = of_clk_get_parent_count(np); - if (num_parents <= 0 || num_parents > 2) + if (num_parents == 0 || num_parents > 2) return; of_clk_parent_fill(np, parent_names, num_parents); -- cgit v1.2.3 From a9bb2ef7c3f4a72f6ac707f7306cfcfd4f2b6b5e Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Tue, 1 Mar 2016 10:59:46 -0800 Subject: clk: at91: Remove CLK_IS_ROOT This flag is a no-op now. Remove usage of the flag. Acked-by: Boris Brezillon Signed-off-by: Stephen Boyd --- drivers/clk/at91/clk-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/clk/at91/clk-main.c') diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c index b85f43529396..b9bdfd8e4e6f 100644 --- a/drivers/clk/at91/clk-main.c +++ b/drivers/clk/at91/clk-main.c @@ -315,7 +315,7 @@ at91_clk_register_main_rc_osc(struct at91_pmc *pmc, init.ops = &main_rc_osc_ops; init.parent_names = NULL; init.num_parents = 0; - init.flags = CLK_IS_ROOT | CLK_IGNORE_UNUSED; + init.flags = CLK_IGNORE_UNUSED; osc->hw.init = &init; osc->pmc = pmc; -- cgit v1.2.3