diff mbox series

[1/2] iio: trigger: hrtimer: Disable irqs before calling iio_trigger_poll()

Message ID 20200727145900.4563-1-ceggers@arri.de (mailing list archive)
State New, archived
Headers show
Series [1/2] iio: trigger: hrtimer: Disable irqs before calling iio_trigger_poll() | expand

Commit Message

Christian Eggers July 27, 2020, 2:58 p.m. UTC
iio_trigger_poll() calls generic_handle_irq(). This function expects to
be run with local IRQs disabled.

Signed-off-by: Christian Eggers <ceggers@arri.de>
Cc: stable@vger.kernel.org
---
 drivers/iio/trigger/iio-trig-hrtimer.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/iio/trigger/iio-trig-hrtimer.c b/drivers/iio/trigger/iio-trig-hrtimer.c
index f59bf8d58586..2fe8a5c1484e 100644
--- a/drivers/iio/trigger/iio-trig-hrtimer.c
+++ b/drivers/iio/trigger/iio-trig-hrtimer.c
@@ -89,7 +89,9 @@  static enum hrtimer_restart iio_hrtimer_trig_handler(struct hrtimer *timer)
 	info = container_of(timer, struct iio_hrtimer_info, timer);
 
 	hrtimer_forward_now(timer, info->period);
+	local_irq_disable();
 	iio_trigger_poll(info->swt.trigger);
+	local_irq_enable();
 
 	return HRTIMER_RESTART;
 }