Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c11f2b24 authored by puneet's avatar puneet Committed by Gerrit - the friendly Code Review server
Browse files

drivers: iio: imu: avoid writing sysfs while buffering



while buffering IAM sensor data, avoide the writing to any
syfs entry from userspace because which leads to buffer data loss.

Change-Id: I2014145855ed7e30e2e829612b0fd3d64f0de7df
Signed-off-by: default avatarpuneet <puneet@codeaurora.org>
parent 0211f235
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -608,6 +608,9 @@ static ssize_t inv_basic_attr_store(struct device *dev,
	struct iio_dev *indio_dev = dev_get_drvdata(dev);
	int result;

	if (inv_check_acc_gyro_early_buff_enable_flag(indio_dev))
		return count;

	mutex_lock(&indio_dev->mlock);
	result = _basic_attr_store(dev, attr, buf, count);