diff mbox series

clocksource: imx-gpt: remove unnecessary irq protection

Message ID 20181105141511.30657-1-peron.clem@gmail.com (mailing list archive)
State Accepted
Headers show
Series clocksource: imx-gpt: remove unnecessary irq protection | expand

Commit Message

Clément Péron Nov. 5, 2018, 2:15 p.m. UTC
shutdown and oneshot are already protected against irq interruptions

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 drivers/clocksource/timer-imx-gpt.c | 17 -----------------
 1 file changed, 17 deletions(-)

Comments

Daniel Lezcano Nov. 5, 2018, 2:30 p.m. UTC | #1
On 05/11/2018 15:15, Clément Péron wrote:
> shutdown and oneshot are already protected against irq interruptions
> 
> Signed-off-by: Clément Péron <peron.clem@gmail.com>
> ---

Applied, thanks!

  -- Daniel
diff mbox series

Patch

diff --git a/drivers/clocksource/timer-imx-gpt.c b/drivers/clocksource/timer-imx-gpt.c
index 165fbbb1c9a0..48e025e8dc82 100644
--- a/drivers/clocksource/timer-imx-gpt.c
+++ b/drivers/clocksource/timer-imx-gpt.c
@@ -198,15 +198,8 @@  static int v2_set_next_event(unsigned long evt,
 static int mxc_shutdown(struct clock_event_device *ced)
 {
 	struct imx_timer *imxtm = to_imx_timer(ced);
-	unsigned long flags;
 	u32 tcn;
 
-	/*
-	 * The timer interrupt generation is disabled at least
-	 * for enough time to call mxc_set_next_event()
-	 */
-	local_irq_save(flags);
-
 	/* Disable interrupt in GPT module */
 	imxtm->gpt->gpt_irq_disable(imxtm);
 
@@ -221,21 +214,12 @@  static int mxc_shutdown(struct clock_event_device *ced)
 	printk(KERN_INFO "%s: changing mode\n", __func__);
 #endif /* DEBUG */
 
-	local_irq_restore(flags);
-
 	return 0;
 }
 
 static int mxc_set_oneshot(struct clock_event_device *ced)
 {
 	struct imx_timer *imxtm = to_imx_timer(ced);
-	unsigned long flags;
-
-	/*
-	 * The timer interrupt generation is disabled at least
-	 * for enough time to call mxc_set_next_event()
-	 */
-	local_irq_save(flags);
 
 	/* Disable interrupt in GPT module */
 	imxtm->gpt->gpt_irq_disable(imxtm);
@@ -260,7 +244,6 @@  static int mxc_set_oneshot(struct clock_event_device *ced)
 	 * mode switching
 	 */
 	imxtm->gpt->gpt_irq_enable(imxtm);
-	local_irq_restore(flags);
 
 	return 0;
 }