summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/clksrc-of.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2013-10-01 11:00:53 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2013-10-02 11:42:48 +0200
commit326e31eebe61dc838e031ea16968b2cfb43443e3 (patch)
treea4e11e9c3f9b2e2b8463750d1a767a1f0ba94971 /drivers/clocksource/clksrc-of.c
parentarm: zynq: Enable arm_global_timer (diff)
downloadlinux-326e31eebe61dc838e031ea16968b2cfb43443e3.tar.xz
linux-326e31eebe61dc838e031ea16968b2cfb43443e3.zip
clocksource: Put nodes passed to CLOCKSOURCE_OF_DECLARE callbacks centrally
Instead of letting each driver call of_node_put do it centrally in the loop that also calls the CLOCKSOURCE_OF_DECLARE callbacks. This is less prone to error and also moves getting and putting the references into the same function. Consequently all respective of_node_put calls in drivers are removed. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'drivers/clocksource/clksrc-of.c')
-rw-r--r--drivers/clocksource/clksrc-of.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c
index 37f5325bec95..8b2ed14f121d 100644
--- a/drivers/clocksource/clksrc-of.c
+++ b/drivers/clocksource/clksrc-of.c
@@ -32,5 +32,6 @@ void __init clocksource_of_init(void)
for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
init_func = match->data;
init_func(np);
+ of_node_put(np);
}
}