Re: [PATCH] iio: light: Add raw attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/08/22 16:13, Dmitry Osipenko wrote:
On 8/11/22 13:14, Shreeya Patel wrote:
+	case IIO_CHAN_INFO_RAW:
+		ret = ltrf216a_set_power_state(data, true);
+		if (ret)
+			return ret;
+		mutex_lock(&data->lock);
+		ret = ltrf216a_read_data(data, LTRF216A_ALS_DATA_0);
+		mutex_unlock(&data->lock);
ltrf216a_set_power_state(data, false) should be called before return.

ah! yes, missed that. Thanks for pointing out. I'll send a v2.


Thanks,
Shreeya Patel

+		if (ret < 0)
+			return ret;
+		*val = ret;
+		ltrf216a_set_power_state(data, false);




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux