From: Axel Lin <axel.lin@ingics.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Shawn Guo <shawn.guo@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org
Subject: [PATCH] clocksource: mxs_timer: Get rid of mxs_clockevent_mode variable
Date: Fri, 03 Jan 2014 12:03:12 +0800 [thread overview]
Message-ID: <1388721792.4741.0.camel@phoenix> (raw)
The current mode setting is stored in mode field of struct clock_event_device.
So we can just remove the mxs_clockevent_mode variable.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/clocksource/mxs_timer.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/clocksource/mxs_timer.c b/drivers/clocksource/mxs_timer.c
index 0f5e65f..d7d5f11 100644
--- a/drivers/clocksource/mxs_timer.c
+++ b/drivers/clocksource/mxs_timer.c
@@ -77,7 +77,6 @@
#define BV_TIMROTv2_TIMCTRLn_SELECT__TICK_ALWAYS 0xf
static struct clock_event_device mxs_clockevent_device;
-static enum clock_event_mode mxs_clockevent_mode = CLOCK_EVT_MODE_UNUSED;
static void __iomem *mxs_timrot_base;
static u32 timrot_major_version;
@@ -156,7 +155,7 @@ static void mxs_set_mode(enum clock_event_mode mode,
/* Disable interrupt in timer module */
timrot_irq_disable();
- if (mode != mxs_clockevent_mode) {
+ if (mode != evt->mode) {
/* Set event time into the furthest future */
if (timrot_is_v1())
__raw_writel(0xffff,
@@ -171,13 +170,10 @@ static void mxs_set_mode(enum clock_event_mode mode,
#ifdef DEBUG
pr_info("%s: changing mode from %s to %s\n", __func__,
- clock_event_mode_label[mxs_clockevent_mode],
+ clock_event_mode_label[evt->mode],
clock_event_mode_label[mode]);
#endif /* DEBUG */
- /* Remember timer mode */
- mxs_clockevent_mode = mode;
-
switch (mode) {
case CLOCK_EVT_MODE_PERIODIC:
pr_err("%s: Periodic mode is not implemented\n", __func__);
--
1.8.1.2
reply other threads:[~2014-01-03 4:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1388721792.4741.0.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shawn.guo@linaro.org \
--cc=tglx@linutronix.de \
/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