clk: at91: fix num_parents test in at91sam9260 slow clk implementation
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Tue, 2 Sep 2014 15:27:51 +0000 (17:27 +0200)
committerMike Turquette <mturquette@linaro.org>
Tue, 2 Sep 2014 21:44:41 +0000 (14:44 -0700)
The slow clk block provided by at91sam9260 and derived SoCs should always
have 2 parents.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/at91/clk-slow.c

index 0300c46ee247517ff9967e8ffbcbfecf9f14fac9..32f7c1b36204018d0ce151601c6ca5ef6f2cf75f 100644 (file)
@@ -447,7 +447,7 @@ void __init of_at91sam9260_clk_slow_setup(struct device_node *np,
        int i;
 
        num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells");
-       if (num_parents <= 0 || num_parents > 1)
+       if (num_parents != 2)
                return;
 
        for (i = 0; i < num_parents; ++i) {