clocksource: mxs_timer: Get rid of mxs_clockevent_mode variable
Subsystems (2)
PATCH 1/1 clocksource: mxs_timer: Get rid of mxs_clockevent_mode variable
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 <[email protected]>
--- drivers/clocksource/mxs_timer.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/clocksource/mxs_timer.c +2 -6
@@ -77,7 +77,6 @@#define BV_TIMROTv2_TIMCTRLn_SELECT__TICK_ALWAYS 0xfstatic 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__);
Signature · 1 line
1.8.1.2