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

Message ID 20200727145900.4563-1-ceggers@arri.de
State New
Headers show
Series
  • [1/2] iio: trigger: hrtimer: Disable irqs before calling iio_trigger_poll()
Related show

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(+)

Patch
diff mbox series

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;
 }