From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Joshua Crofts <joshua.crofts1@gmail.com>
Cc: Stepan Ionichev <sozdayvek@gmail.com>,
jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org, gregkh@linuxfoundation.org, hcazarim@yahoo.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: trigger: iio-trig-interrupt: use devm_* helpers
Date: Mon, 11 May 2026 16:46:04 +0300 [thread overview]
Message-ID: <agHdnHcKrMSAeeUf@ashevche-desk.local> (raw)
In-Reply-To: <CALoEA-wQ_hYsP8iOhHf6yAzpgA-Bq+78bC=BqZdaPcz9bW1Gww@mail.gmail.com>
On Mon, May 11, 2026 at 03:33:06PM +0200, Joshua Crofts wrote:
> On Mon, 11 May 2026 at 15:23, Stepan Ionichev <sozdayvek@gmail.com> wrote:
...
> > No functional change.
>
> I would say that this is a functional change, you are changing
> how resources are managed and how teardown works. (But
> maybe I'm wrong).
Actually yes, this is quite a change that might have some subtle differences.
...
> > - trig = iio_trigger_alloc(NULL, "irqtrig%d", irq);
> > - if (!trig) {
> > - ret = -ENOMEM;
> > - goto error_ret;
> > - }
> > + trig = devm_iio_trigger_alloc(&pdev->dev, "irqtrig%d", irq);
Looking at this and taking into account the above, have you checked the
- trigger lifetime versus platform device
- parent-child relationship in the sysfs
The latter might lead to interesting side-effects.
> > + if (!trig)
> > + return -ENOMEM;
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-05-11 13:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 6:07 [PATCH] iio: trigger: iio-trig-interrupt: use devm_* helpers Stepan Ionichev
2026-05-11 6:32 ` [PATCH v2] " Stepan Ionichev
2026-05-11 13:53 ` Joshua Crofts
2026-05-11 14:56 ` Jonathan Cameron
2026-05-11 15:05 ` Andy Shevchenko
2026-05-11 6:36 ` [PATCH] " Stepan Ionichev
2026-05-11 6:44 ` Stepan Ionichev
2026-05-11 13:33 ` Joshua Crofts
2026-05-11 6:27 ` Stepan Ionichev
2026-05-11 13:48 ` Joshua Crofts
2026-05-11 13:46 ` Andy Shevchenko [this message]
2026-05-11 13:38 ` Andy Shevchenko
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=agHdnHcKrMSAeeUf@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=hcazarim@yahoo.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=sozdayvek@gmail.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