diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2016-02-20 02:29:17 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-02-27 01:01:32 +0100 |
commit | 8c1b1e54faed690261752afcba27c79ce4d3fa10 (patch) | |
tree | 075c60de1e8e0d9ce51833e3d9c64b34494483fb /drivers/clk/at91/clk-generated.c | |
parent | clk: Make of_clk_get_parent_count() return unsigned ints (diff) | |
download | linux-8c1b1e54faed690261752afcba27c79ce4d3fa10.tar.xz linux-8c1b1e54faed690261752afcba27c79ce4d3fa10.zip |
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 <boris.brezillon@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/at91/clk-generated.c')
-rw-r--r-- | drivers/clk/at91/clk-generated.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c index abc80949e1dd..f82b16a65dee 100644 --- a/drivers/clk/at91/clk-generated.c +++ b/drivers/clk/at91/clk-generated.c @@ -268,13 +268,13 @@ void __init of_sama5d2_clk_generated_setup(struct device_node *np, u32 id; const char *name; struct clk *clk; - int num_parents; + unsigned int num_parents; const char *parent_names[GENERATED_SOURCE_MAX]; struct device_node *gcknp; struct clk_range range = CLK_RANGE(0, 0); num_parents = of_clk_get_parent_count(np); - if (num_parents <= 0 || num_parents > GENERATED_SOURCE_MAX) + if (num_parents == 0 || num_parents > GENERATED_SOURCE_MAX) return; of_clk_parent_fill(np, parent_names, num_parents); |