summaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-core.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-10-04 12:07:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-10-12 12:05:36 +0100
commitd2f0a48f36aea38e0a5c4b439d5d9c96aecabad9 (patch)
tree2bc65afab0101f23f9e31e44500b858444c6d100 /drivers/iio/industrialio-core.c
parentf18e7a068a0a31250cdb251810f8f6224931c3f5 (diff)
downloadtalos-obmc-linux-d2f0a48f36aea38e0a5c4b439d5d9c96aecabad9.tar.gz
talos-obmc-linux-d2f0a48f36aea38e0a5c4b439d5d9c96aecabad9.zip
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.c4
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)
iio_disable_all_buffers(indio_dev);
indio_dev->info = NULL;
+
+ iio_device_wakeup_eventset(indio_dev);
+ iio_buffer_wakeup_poll(indio_dev);
+
mutex_unlock(&indio_dev->info_exist_lock);
}
EXPORT_SYMBOL(iio_device_unregister);
OpenPOWER on IntegriCloud