diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-09-18 21:02:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-21 12:36:30 +0100 |
commit | a87c82e454f184a9473f8cdfd4d304205f585f65 (patch) | |
tree | 5f158830b28d740e6782dac2683fd46cde7b23fb /drivers/iio/iio_core.h | |
parent | d66e0452bf6b0d98cd1a478918c92f2baffcb413 (diff) | |
download | talos-obmc-linux-a87c82e454f184a9473f8cdfd4d304205f585f65.tar.gz talos-obmc-linux-a87c82e454f184a9473f8cdfd4d304205f585f65.zip |
iio: Stop sampling when the device is removed
Make sure to stop sampling when the device is removed, otherwise it will
continue to sample forever.
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iio/iio_core.h b/drivers/iio/iio_core.h index 05c1b74502a3..9b32253b824b 100644 --- a/drivers/iio/iio_core.h +++ b/drivers/iio/iio_core.h @@ -49,11 +49,15 @@ ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf, #define iio_buffer_poll_addr (&iio_buffer_poll) #define iio_buffer_read_first_n_outer_addr (&iio_buffer_read_first_n_outer) +void iio_disable_all_buffers(struct iio_dev *indio_dev); + #else #define iio_buffer_poll_addr NULL #define iio_buffer_read_first_n_outer_addr NULL +static inline void iio_disable_all_buffers(struct iio_dev *indio_dev) {} + #endif int iio_device_register_eventset(struct iio_dev *indio_dev); |