clocksource: of: Respect device tree node status
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Thu, 26 Sep 2013 00:08:17 +0000 (02:08 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 26 Sep 2013 00:30:16 +0000 (02:30 +0200)
Clocksource devices provided by DT can be disabled (status != "okay").
Instead of registering clocksource drivers for disabled nodes, respect
the device's status by skiping disabled nodes.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/clksrc-of.c

index 37f5325..b9ddd9e 100644 (file)
@@ -30,6 +30,9 @@ void __init clocksource_of_init(void)
        clocksource_of_init_fn init_func;
 
        for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
+               if (!of_device_is_available(np))
+                       continue;
+
                init_func = match->data;
                init_func(np);
        }