[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa583bc3-bb43-2788-3c83-479859c40b75@collabora.com>
Date: Thu, 11 Aug 2022 16:21:05 +0530
From: Shreeya Patel <shreeya.patel@...labora.com>
To: Dmitry Osipenko <dmitry.osipenko@...labora.com>, jic23@...nel.org,
lars@...afoo.de
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
krisman@...labora.com, kernel@...labora.com,
alvaro.soliverez@...labora.com
Subject: Re: [PATCH] iio: light: Add raw attribute
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);
>
Powered by blists - more mailing lists