From: Tony Lindgren <tony@atomide.com>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Benoit Cousson <b-cousson@ti.com>
Subject: Re: [PATCH 2/2] ARM: OMAP4: Add local timer support for Device Tree
Date: Mon, 9 Jul 2012 06:15:49 -0700 [thread overview]
Message-ID: <20120709131549.GI1122@atomide.com> (raw)
In-Reply-To: <1341839470-5586-3-git-send-email-santosh.shilimkar@ti.com>
* Santosh Shilimkar <santosh.shilimkar@ti.com> [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
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: OMAP4: Add local timer support for Device Tree
Date: Mon, 9 Jul 2012 06:15:49 -0700 [thread overview]
Message-ID: <20120709131549.GI1122@atomide.com> (raw)
In-Reply-To: <1341839470-5586-3-git-send-email-santosh.shilimkar@ti.com>
* Santosh Shilimkar <santosh.shilimkar@ti.com> [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
next prev parent reply other threads:[~2012-07-09 13:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-09 13:11 [PATCH 0/2] OMAP4: DT update for L2 controller and local timers Santosh Shilimkar
2012-07-09 13:11 ` Santosh Shilimkar
2012-07-09 13:11 ` [PATCH 1/2] ARM: OMAP4: Add L2 Cache Controller in Device Tree Santosh Shilimkar
2012-07-09 13:11 ` Santosh Shilimkar
2012-07-09 13:11 ` [PATCH 2/2] ARM: OMAP4: Add local timer support for " Santosh Shilimkar
2012-07-09 13:11 ` Santosh Shilimkar
2012-07-09 13:15 ` Tony Lindgren [this message]
2012-07-09 13:15 ` Tony Lindgren
2012-07-09 13:25 ` Shilimkar, Santosh
2012-07-09 13:25 ` Shilimkar, Santosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120709131549.GI1122@atomide.com \
--to=tony@atomide.com \
--cc=b-cousson@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=santosh.shilimkar@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.