Skip to contentSkip to conversation

iio:common: added disable function after read info raw data

PATCH Applied Denis CIOCCA 2 participants 2 messages May 9, 2013 – May 11, 2013 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio:common: added disable function after read info raw data

---
 drivers/iio/common/st_sensors/st_sensors_core.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/iio/common/st_sensors/st_sensors_core.c +2 -0
index bd33473..ed9bc8a 100644
@@ -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);
 
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw
Quoted 1 line · Denis CIOCCA

Applied to fixes-togreg branch of iio.git

Quoted 18 lines
---
 drivers/iio/common/st_sensors/st_sensors_core.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/iio/common/st_sensors/st_sensors_core.c +2 -0
index bd33473..ed9bc8a 100644
@@ -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);