summaryrefslogtreecommitdiff
path: root/drivers/clocksource/dw_apb_timer_of.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2013-10-01 13:00:53 +0400
committerDaniel Lezcano <daniel.lezcano@linaro.org>2013-10-02 13:42:48 +0400
commit326e31eebe61dc838e031ea16968b2cfb43443e3 (patch)
treea4e11e9c3f9b2e2b8463750d1a767a1f0ba94971 /drivers/clocksource/dw_apb_timer_of.c
parentfa94bd57b5a5b2206e5fdd0ed2dbacff199121f2 (diff)
downloadlinux-326e31eebe61dc838e031ea16968b2cfb43443e3.tar.xz
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/dw_apb_timer_of.c')
-rw-r--r--drivers/clocksource/dw_apb_timer_of.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/clocksource/dw_apb_timer_of.c b/drivers/clocksource/dw_apb_timer_of.c
index 003b2309f463..482618b59fa4 100644
--- a/drivers/clocksource/dw_apb_timer_of.c
+++ b/drivers/clocksource/dw_apb_timer_of.c
@@ -138,12 +138,10 @@ static void __init dw_apb_timer_init(struct device_node *timer)
case 0:
pr_debug("%s: found clockevent timer\n", __func__);
add_clockevent(timer);
- of_node_put(timer);
break;
case 1:
pr_debug("%s: found clocksource timer\n", __func__);
add_clocksource(timer);
- of_node_put(timer);
init_sched_clock();
break;
default: