diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2013-10-01 05:00:53 -0400 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2013-10-02 05:42:48 -0400 |
commit | 326e31eebe61dc838e031ea16968b2cfb43443e3 (patch) | |
tree | a4e11e9c3f9b2e2b8463750d1a767a1f0ba94971 /drivers/clocksource/tegra20_timer.c | |
parent | fa94bd57b5a5b2206e5fdd0ed2dbacff199121f2 (diff) |
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/tegra20_timer.c')
-rw-r--r-- | drivers/clocksource/tegra20_timer.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c index 5cff61677b6c..642849256d82 100644 --- a/drivers/clocksource/tegra20_timer.c +++ b/drivers/clocksource/tegra20_timer.c | |||
@@ -181,8 +181,6 @@ static void __init tegra20_init_timer(struct device_node *np) | |||
181 | rate = clk_get_rate(clk); | 181 | rate = clk_get_rate(clk); |
182 | } | 182 | } |
183 | 183 | ||
184 | of_node_put(np); | ||
185 | |||
186 | switch (rate) { | 184 | switch (rate) { |
187 | case 12000000: | 185 | case 12000000: |
188 | timer_writel(0x000b, TIMERUS_USEC_CFG); | 186 | timer_writel(0x000b, TIMERUS_USEC_CFG); |
@@ -241,8 +239,6 @@ static void __init tegra20_init_rtc(struct device_node *np) | |||
241 | else | 239 | else |
242 | clk_prepare_enable(clk); | 240 | clk_prepare_enable(clk); |
243 | 241 | ||
244 | of_node_put(np); | ||
245 | |||
246 | register_persistent_clock(NULL, tegra_read_persistent_clock); | 242 | register_persistent_clock(NULL, tegra_read_persistent_clock); |
247 | } | 243 | } |
248 | CLOCKSOURCE_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc); | 244 | CLOCKSOURCE_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc); |