summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2013-09-26 02:08:17 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2013-09-26 02:30:16 +0200
commiteeb93d02c5d8819c74f6d4da08325cff8c6a9376 (patch)
tree98f3b8ce9acd98ff1170be51f1671058f41093d3 /drivers/clocksource
parent5df718d84679936454e815451d748ccca0e9edad (diff)
clocksource: of: Respect device tree node status
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>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/clksrc-of.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c
index 37f5325bec9..b9ddd9e3a2f 100644
--- a/drivers/clocksource/clksrc-of.c
+++ b/drivers/clocksource/clksrc-of.c
@@ -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);
}