[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DF540STWMPDB.175MXGIDPR9L8@gmail.com>
Date: Mon, 22 Dec 2025 17:47:53 -0500
From: "Kurt Borja" <kuurtb@...il.com>
To: "Jonathan Cameron" <jic23@...nel.org>, "Kurt Borja" <kuurtb@...il.com>
Cc: "David Lechner" <dlechner@...libre.com>, Nuno Sá
<nuno.sa@...log.com>, "Andy Shevchenko" <andy@...nel.org>,
<linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iio: adc: ti-ads1018: Drop
iio_device_claim_buffer_mode() call
On Sun Dec 21, 2025 at 1:49 PM -05, Jonathan Cameron wrote:
> On Tue, 16 Dec 2025 19:52:01 -0500
> Kurt Borja <kuurtb@...il.com> wrote:
>
>> Drop iio_device_claim_buffer_mode() call in ads1018_trigger_handler() as
>> it's not actually protecting anything.
>>
>> Signed-off-by: Kurt Borja <kuurtb@...il.com>
> I squashed this in. One comment inline.
>> ---
>> drivers/iio/adc/ti-ads1018.c | 12 +++---------
>> 1 file changed, 3 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/iio/adc/ti-ads1018.c b/drivers/iio/adc/ti-ads1018.c
>> index af08702b62d2..b34184f68e63 100644
>> --- a/drivers/iio/adc/ti-ads1018.c
>> +++ b/drivers/iio/adc/ti-ads1018.c
>> @@ -557,9 +557,6 @@ static irqreturn_t ads1018_trigger_handler(int irq, void *p)
>> } scan = {};
>> int ret;
>>
>> - if (iio_device_claim_buffer_mode(indio_dev))
>> - goto out_notify_done;
>> -
>> if (iio_trigger_using_own(indio_dev)) {
>> disable_irq(ads1018->drdy_irq);
>> ret = ads1018_spi_read_exclusive(ads1018, &scan.conv, true);
>> @@ -568,14 +565,11 @@ static irqreturn_t ads1018_trigger_handler(int irq, void *p)
>> ret = spi_read(ads1018->spi, ads1018->rx_buf, sizeof(ads1018->rx_buf));
>> scan.conv = ads1018->rx_buf[0];
>> }
>> - if (ret)
>> - goto out_release_buffer;
>>
>> - iio_push_to_buffers_with_ts(indio_dev, &scan, sizeof(scan), pf->timestamp);
>> + if (!ret)
> Generally I fairly strongly prefer error paths out of line but in this
> case I'd rather just get this merged than go around again so I'll leave
> this as it stands.
Apologies, I'll keep it in mind.
Thanks, Jonathan!
--
~ Kurt
Powered by blists - more mailing lists