Commit ec3372f2 authored by Clément Péron's avatar Clément Péron Committed by Daniel Lezcano
Browse files

clocksource/drivers/imx-gpt: Remove unnecessary irq protection



shutdown and oneshot are already protected against irq interruptions

Signed-off-by: default avatarClément Péron <peron.clem@gmail.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent df181e38
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -202,15 +202,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);

@@ -225,21 +218,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);
@@ -264,7 +248,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;
}