From: David Lechner <dlechner@baylibre.com>
To: "Harshit Mogalapalli" <harshit.m.mogalapalli@oracle.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Andrew Ijano" <andrew.ijano@gmail.com>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, error27@gmail.com,
andriy.shevchenko@intel.com
Subject: Re: [PATCH v2 next 2/5] iio: sca3000: switch IRQ handling to devm helpers
Date: Mon, 2 Feb 2026 17:06:56 -0600 [thread overview]
Message-ID: <62d09f1c-9869-412a-a2ea-3be81ec13ede@baylibre.com> (raw)
In-Reply-To: <20260202194033.627967-3-harshit.m.mogalapalli@oracle.com>
On 2/2/26 1:40 PM, Harshit Mogalapalli wrote:
> Convert the threaded IRQ registration to devm_request_threaded_irq() so
> that the probe and remove paths can drop manual freeing of irqs.
>
> No functionality change.
>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
> ---
> v1->v2: Fix indentation in devm_request_threaded_irq() call[ Thanks to
> Jonathan]
> ---
> drivers/iio/accel/sca3000.c | 25 ++++++++-----------------
> 1 file changed, 8 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
> index afe6ef61a53b..37ef724d5dc5 100644
> --- a/drivers/iio/accel/sca3000.c
> +++ b/drivers/iio/accel/sca3000.c
> @@ -1473,34 +1473,27 @@ static int sca3000_probe(struct spi_device *spi)
> return ret;
>
> if (spi->irq) {
> - ret = request_threaded_irq(spi->irq,
> - NULL,
> - &sca3000_event_handler,
> - IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> - "sca3000",
> - indio_dev);
> + ret = devm_request_threaded_irq(dev, spi->irq, NULL,
> + &sca3000_event_handler,
> + IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> + "sca3000",
> + indio_dev);
> if (ret)
> return ret;
> }
> ret = sca3000_clean_setup(st);
> if (ret)
> - goto error_free_irq;
> + return ret;
>
> ret = sca3000_print_rev(indio_dev);
> if (ret)
> - goto error_free_irq;
> + return ret;
>
> ret = iio_device_register(indio_dev);
> if (ret)
> - goto error_free_irq;
> + return ret;
>
> return 0;
Could return directly here already, but it gets cleaned up in a
later patch, so its OK.
Reviewed-by: David Lechner <dlechner@baylibe.com>
next prev parent reply other threads:[~2026-02-02 23:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 19:40 [PATCH v2 next 0/5] IIO: sca3000: devm resource management Harshit Mogalapalli
2026-02-02 19:40 ` [PATCH v2 next 1/5] iio: sca3000: cache SPI device ID in probe Harshit Mogalapalli
2026-02-02 23:01 ` David Lechner
2026-02-03 10:24 ` Harshit Mogalapalli
2026-02-03 15:26 ` David Lechner
2026-02-02 19:40 ` [PATCH v2 next 2/5] iio: sca3000: switch IRQ handling to devm helpers Harshit Mogalapalli
2026-02-02 23:06 ` David Lechner [this message]
2026-02-02 19:40 ` [PATCH v2 next 3/5] iio: sca3000: stop interrupts via devm_add_action_or_reset() Harshit Mogalapalli
2026-02-02 23:04 ` David Lechner
2026-02-03 10:27 ` Harshit Mogalapalli
2026-02-02 19:40 ` [PATCH v2 next 4/5] iio: sca3000: manage device registration with devm helper Harshit Mogalapalli
2026-02-02 23:07 ` David Lechner
2026-02-03 12:29 ` Harshit Mogalapalli
2026-02-02 19:40 ` [PATCH v2 next 5/5] iio: sca3000: use guard(mutex) to simplify return paths Harshit Mogalapalli
2026-02-02 23:09 ` David Lechner
2026-02-03 9:48 ` [PATCH v2 next 0/5] IIO: sca3000: devm resource management Andy Shevchenko
2026-02-03 10:29 ` Harshit Mogalapalli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=62d09f1c-9869-412a-a2ea-3be81ec13ede@baylibre.com \
--to=dlechner@baylibre.com \
--cc=andrew.ijano@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=error27@gmail.com \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=jic23@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox