public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Frank Li <Frank.li@nxp.com>
Cc: Mark Brown <broonie@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	linux-spi@vger.kernel.org, imx@lists.linux.dev,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] spi: imx: fix runtime pm leak on probe deferral
Date: Wed, 22 Apr 2026 08:47:57 +0200	[thread overview]
Message-ID: <aehvHZMjwMNmru0x@hovoldconsulting.com> (raw)
In-Reply-To: <aehBYJ-R3bXB0RDo@lizhi-Precision-Tower-5810>

On Tue, Apr 21, 2026 at 11:32:48PM -0400, Frank Li wrote:
> On Tue, Apr 21, 2026 at 02:56:32PM +0200, Johan Hovold wrote:
> > Make sure to balance the runtime PM usage count before returning on
> > probe failure (e.g. probe deferral) so that the controller can be
> > suspended when a driver is later bound.
> >
> > Fixes: 43b6bf406cd0 ("spi: imx: fix runtime pm support for !CONFIG_PM")
> > Cc: stable@vger.kernel.org	# 5.10
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Signed-off-by: Johan Hovold <johan@kernel.org>
> > ---
> >  drivers/spi/spi-imx.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
> > index 4747899e0646..e5c907c45b87 100644
> > --- a/drivers/spi/spi-imx.c
> > +++ b/drivers/spi/spi-imx.c
> > @@ -2373,6 +2373,7 @@ static int spi_imx_probe(struct platform_device *pdev)
> >  out_runtime_pm_put:
> >  	pm_runtime_dont_use_autosuspend(spi_imx->dev);
> >  	pm_runtime_disable(spi_imx->dev);
> > +	pm_runtime_put_noidle(spi_imx->dev);
> 
> use devm_pm_runtime_get_noresume() and  devm_pm_runtime_enable() to
> fix this problem

No. The first helper you mentioned was only added a year ago and does
not even solve the issue without rewriting larger parts of the driver.

So that would need to be a separate change in any case.

Johan

  reply	other threads:[~2026-04-22  6:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21 12:56 [PATCH] spi: imx: fix runtime pm leak on probe deferral Johan Hovold
2026-04-22  3:32 ` Frank Li
2026-04-22  6:47   ` Johan Hovold [this message]
2026-04-22  7:34     ` Frank Li
2026-04-22 12:44 ` Mark Brown

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=aehvHZMjwMNmru0x@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=Frank.li@nxp.com \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=stable@vger.kernel.org \
    /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