diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-10-04 07:07:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-10-12 07:05:36 -0400 |
commit | d2f0a48f36aea38e0a5c4b439d5d9c96aecabad9 (patch) | |
tree | 2bc65afab0101f23f9e31e44500b858444c6d100 /drivers/iio/industrialio-core.c | |
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/industrialio-core.c')
-rw-r--r-- | drivers/iio/industrialio-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index a019a7b424cb..dc24a9b3d325 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c | |||
@@ -1139,6 +1139,10 @@ void iio_device_unregister(struct iio_dev *indio_dev) | |||
1139 | iio_disable_all_buffers(indio_dev); | 1139 | iio_disable_all_buffers(indio_dev); |
1140 | 1140 | ||
1141 | indio_dev->info = NULL; | 1141 | indio_dev->info = NULL; |
1142 | |||
1143 | iio_device_wakeup_eventset(indio_dev); | ||
1144 | iio_buffer_wakeup_poll(indio_dev); | ||
1145 | |||
1142 | mutex_unlock(&indio_dev->info_exist_lock); | 1146 | mutex_unlock(&indio_dev->info_exist_lock); |
1143 | } | 1147 | } |
1144 | EXPORT_SYMBOL(iio_device_unregister); | 1148 | EXPORT_SYMBOL(iio_device_unregister); |