diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-10-04 12:07:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-10-12 12:05:36 +0100 |
commit | d2f0a48f36aea38e0a5c4b439d5d9c96aecabad9 (patch) | |
tree | 2bc65afab0101f23f9e31e44500b858444c6d100 /drivers/iio/iio_core.h | |
parent | f18e7a068a0a31250cdb251810f8f6224931c3f5 (diff) |
iio: Wakeup poll and blocking reads when the device is unregistered
Once the device has been unregistered there won't be any new data no matter how
long a userspace application waits, so we might as well wake them up and let
them know.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/iio_core.h')
-rw-r--r-- | drivers/iio/iio_core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/iio_core.h b/drivers/iio/iio_core.h index 9209f47b273a..7512cf728ee6 100644 --- a/drivers/iio/iio_core.h +++ b/drivers/iio/iio_core.h @@ -50,6 +50,7 @@ ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf, #define iio_buffer_read_first_n_outer_addr (&iio_buffer_read_first_n_outer) void iio_disable_all_buffers(struct iio_dev *indio_dev); +void iio_buffer_wakeup_poll(struct iio_dev *indio_dev); #else @@ -57,11 +58,13 @@ void iio_disable_all_buffers(struct iio_dev *indio_dev); #define iio_buffer_read_first_n_outer_addr NULL static inline void iio_disable_all_buffers(struct iio_dev *indio_dev) {} +static inline void iio_buffer_wakeup_poll(struct iio_dev *indio_dev) {} #endif int iio_device_register_eventset(struct iio_dev *indio_dev); void iio_device_unregister_eventset(struct iio_dev *indio_dev); +void iio_device_wakeup_eventset(struct iio_dev *indio_dev); int iio_event_getfd(struct iio_dev *indio_dev); #endif |