From: jon-hunter@ti.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 6/7] ARM: OMAP2+: Store ID of system timers in timer structure
Date: Mon, 4 Feb 2013 11:43:05 -0600 [thread overview]
Message-ID: <1359999786-8740-7-git-send-email-jon-hunter@ti.com> (raw)
In-Reply-To: <1359999786-8740-1-git-send-email-jon-hunter@ti.com>
Currently, the timer ID is being passed to the function
omap_dm_timer_init_one(). Instead of passing the ID separately, store it
in the omap_dm_timer structure, that is also passed, and access the ID
from this structure.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
arch/arm/mach-omap2/timer.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 1b99b41..c5770ff 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -210,7 +210,6 @@ static u32 __init omap_dm_timer_get_errata(void)
}
static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
- int gptimer_id,
const char *fck_source,
const char *property,
const char **timer_name,
@@ -241,10 +240,10 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
of_node_put(np);
} else {
- if (omap_dm_timer_reserve_systimer(gptimer_id))
+ if (omap_dm_timer_reserve_systimer(timer->id))
return -ENODEV;
- sprintf(name, "timer%d", gptimer_id);
+ sprintf(name, "timer%d", timer->id);
oh_name = name;
}
@@ -317,6 +316,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
{
int res;
+ clkev.id = gptimer_id;
clkev.errata = omap_dm_timer_get_errata();
/*
@@ -326,7 +326,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
*/
__omap_dm_timer_override_errata(&clkev, OMAP_TIMER_ERRATA_I103_I767);
- res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source, property,
+ res = omap_dm_timer_init_one(&clkev, fck_source, property,
&clockevent_gpt.name, OMAP_TIMER_POSTED);
BUG_ON(res);
@@ -446,9 +446,10 @@ static void __init omap2_gptimer_clocksource_init(int gptimer_id,
{
int res;
+ clksrc.id = gptimer_id;
clksrc.errata = omap_dm_timer_get_errata();
- res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source, property,
+ res = omap_dm_timer_init_one(&clksrc, fck_source, property,
&clocksource_gpt.name,
OMAP_TIMER_NONPOSTED);
BUG_ON(res);
--
1.7.10.4
next prev parent reply other threads:[~2013-02-04 17:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 17:42 [PATCH V2 0/7] ARM: OMAP2+: System timer updates Jon Hunter
2013-02-04 17:43 ` [PATCH V2 1/7] ARM: OMAP2+: Fix selection of clockevent timer when using device-tree Jon Hunter
2013-02-04 17:43 ` [PATCH V2 2/7] ARM: OMAP2+: Display correct system timer name Jon Hunter
2013-02-04 17:43 ` [PATCH V2 3/7] ARM: OMAP2+: Remove hard-coded test on timer ID Jon Hunter
2013-02-04 17:46 ` Russell King - ARM Linux
2013-02-04 18:01 ` Jon Hunter
2013-02-04 17:43 ` [PATCH V2 4/7] ARM: OMAP2+: Simplify system timer clock definitions Jon Hunter
2013-02-04 17:43 ` [PATCH V2 5/7] ARM: OMAP2+: Simplify system timers definitions Jon Hunter
2013-02-04 17:43 ` Jon Hunter [this message]
2013-02-04 17:43 ` [PATCH V2 7/7] ARM: OMAP4+: Fix sparse warning in system timers Jon Hunter
2013-02-04 17:47 ` [PATCH V2 0/7] ARM: OMAP2+: System timer updates Jon Hunter
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=1359999786-8740-7-git-send-email-jon-hunter@ti.com \
--to=jon-hunter@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox