aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/industrialio-event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
index 10aa9ef86cec..2390e3d08e48 100644
--- a/drivers/iio/industrialio-event.c
+++ b/drivers/iio/industrialio-event.c
@@ -159,7 +159,7 @@ int iio_event_getfd(struct iio_dev *indio_dev)
159 } 159 }
160 spin_unlock_irq(&ev_int->wait.lock); 160 spin_unlock_irq(&ev_int->wait.lock);
161 fd = anon_inode_getfd("iio:event", 161 fd = anon_inode_getfd("iio:event",
162 &iio_event_chrdev_fileops, ev_int, O_RDONLY); 162 &iio_event_chrdev_fileops, ev_int, O_RDONLY | O_CLOEXEC);
163 if (fd < 0) { 163 if (fd < 0) {
164 spin_lock_irq(&ev_int->wait.lock); 164 spin_lock_irq(&ev_int->wait.lock);
165 __clear_bit(IIO_BUSY_BIT_POS, &ev_int->flags); 165 __clear_bit(IIO_BUSY_BIT_POS, &ev_int->flags);