iio:common:st: added disable function after read info raw data
authorDenis CIOCCA <denis.ciocca@st.com>
Thu, 9 May 2013 13:35:00 +0000 (14:35 +0100)
committerJonathan Cameron <jic23@kernel.org>
Wed, 22 May 2013 21:14:58 +0000 (22:14 +0100)
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/common/st_sensors/st_sensors_core.c

index bd33473f8e38afd4deeeb243f12c2bf981587740..ed9bc8ae933030158c9d23b41acfc2bd2de7d61e 100644 (file)
@@ -312,6 +312,8 @@ int st_sensors_read_info_raw(struct iio_dev *indio_dev,
                        goto read_error;
 
                *val = *val >> ch->scan_type.shift;
+
+               err = st_sensors_set_enable(indio_dev, false);
        }
        mutex_unlock(&indio_dev->mlock);