* Santosh Shilimkar <[email protected]> [120709 06:16]:
> Add cortex-a9 local timer  support for all OMAP4 based
> SOCs using DT.
...

> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -36,6 +36,7 @@
>  #include <linux/clocksource.h>
>  #include <linux/clockchips.h>
>  #include <linux/slab.h>
> +#include <linux/of.h>
>  
>  #include <asm/mach/time.h>
>  #include <plat/dmtimer.h>
> @@ -384,9 +385,13 @@ static void __init omap4_timer_init(void)
>       if (omap_rev() != OMAP4430_REV_ES1_0) {
>               int err;
>  
> -             err = twd_local_timer_register(&twd_local_timer);
> -             if (err)
> -                     pr_err("twd_local_timer_register failed %d\n", err);
> +             if (of_have_populated_dt()) {
> +                     twd_local_timer_of_register();
> +             } else {
> +                     err = twd_local_timer_register(&twd_local_timer);
> +                     if (err)
> +                             pr_err("twd_local_timer_register failed %d\n", 
> err);
> +             }
>       }
>  #endif
>  }

How about just return after twd_local_timer_of_register() instead?
That avoids nesting the code further.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to