clocksource: put nodes passed to CLOCKSOURCE_OF_DECLARE callbacks centrally
Subsystems (5)
PATCH 1/1 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.
--- arch/arm/mach-msm/timer.c | 1 - drivers/clocksource/clksrc-of.c | 1 + drivers/clocksource/dw_apb_timer_of.c | 2 -- drivers/clocksource/tegra20_timer.c | 4 ---- drivers/clocksource/vt8500_timer.c | 2 -- 5 files changed, 1 insertion(+), 9 deletions(-)
arch/arm/mach-msm/timer.c +0 -1
@@ -274,7 +274,6 @@ static void __init msm_dt_timer_init(struct device_node *np)pr_err ("Unknown frequency\n" );return ; } -of_node_put (np); event_base = base +0x4 ; sts_base = base +0x88 ;
drivers/clocksource/clksrc-of.c +1 -0
@@ -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); } }
drivers/clocksource/dw_apb_timer_of.c +0 -2
@@ -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 :
drivers/clocksource/tegra20_timer.c +0 -4
@@ -181,8 +181,6 @@ static void __init tegra20_init_timer(struct device_node *np) rate =clk_get_rate (clk); } -of_node_put (np); -switch (rate) {case 12000000 :timer_writel (0x000b ,TIMERUS_USEC_CFG );
@@ -241,8 +239,6 @@ static void __init tegra20_init_rtc(struct device_node *np)else clk_prepare_enable (clk); -of_node_put (np); -register_persistent_clock (NULL , tegra_read_persistent_clock); }CLOCKSOURCE_OF_DECLARE (tegra20_rtc,"nvidia,tegra20-rtc" , tegra20_init_rtc);
drivers/clocksource/vt8500_timer.c +0 -2
@@ -137,14 +137,12 @@ static void __init vt8500_timer_init(struct device_node *np)if (!regbase) {pr_err ("%s: Missing iobase description in Device Tree\n" , __func__); -of_node_put (np);return ; } timer_irq =irq_of_parse_and_map (np,0 );if (!timer_irq) {pr_err ("%s: Missing irq description in Device Tree\n" , __func__); -of_node_put (np);return ; }
Signature · 1 line
1.8.4.rc3
PATCH 1/1 clocksource: put nodes passed to CLOCKSOURCE_OF_DECLARE callbacks centrally
Quoted 10 lines · Uwe Kleine-K?nig
Instead of letting each driver call
of_node_putdo it centrally in the loop that also calls theCLOCKSOURCE_OF_DECLAREcallbacks. This is less prone to error and also moves getting and putting the references into the same function.Consequently all respective
of_node_putcalls in drivers are removed.Signed-off-by Uwe Kleine-K?nig <[email protected]>---
arch/arm/mach-msm/timer.c| 1 -
Signature · 3 lines
sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
Daniel Lezcano
AppliedPATCH 1/1 clocksource: put nodes passed to CLOCKSOURCE_OF_DECLARE callbacks centrally
In reply to Uwe Kleine-KönigQuoted 9 lines · Uwe Kleine-K?nig
Instead of letting each driver call
of_node_putdo it centrally in the loop that also calls theCLOCKSOURCE_OF_DECLAREcallbacks. This is less prone to error and also moves getting and putting the references into the same function.Consequently all respective
of_node_putcalls in drivers are removed.Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Applied in my tree for 3.13.
Thanks
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog