Skip to content

Commit

Permalink
clocksource: of: Respect device tree node status
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Hesselbarth authored and Daniel Lezcano committed Sep 26, 2013
1 parent 5df718d commit eeb93d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/clocksource/clksrc-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit eeb93d0

Please sign in to comment.