From: "Pandey, Radhey Shyam" <radheys@amd.com>
To: Ruoyu Wang <ruoyuw560@gmail.com>,
Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>,
Srinivas Neeli <srinivas.neeli@amd.com>,
Michal Simek <michal.simek@amd.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>
Cc: Harini Katakam <harini.katakam@xilinx.com>,
Soren Brinkmann <soren.brinkmann@xilinx.com>,
linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: zynq: fix runtime PM leak on remove
Date: Tue, 9 Jun 2026 18:30:12 +0530 [thread overview]
Message-ID: <ff4746f5-d48f-4959-93bb-d88705f10d0a@amd.com> (raw)
In-Reply-To: <20260609073313.5-1-ruoyuw560@gmail.com>
> pm_runtime_get_sync() increments the runtime PM usage counter even when it
> returns an error. zynq_gpio_remove() uses it to keep the controller active
> while removing the GPIO chip, but never drops the usage counter again.
>
> Balance the get with pm_runtime_put_noidle() after disabling runtime PM.
>
> Fixes: 3242ba117e9b ("gpio: Add driver for Zynq GPIO controller")
> Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Thanks!
> ---
> drivers/gpio/gpio-zynq.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
> index 571e366624d2a..fafca91128b2e 100644
> --- a/drivers/gpio/gpio-zynq.c
> +++ b/drivers/gpio/gpio-zynq.c
> @@ -1014,6 +1014,7 @@ static void zynq_gpio_remove(struct platform_device *pdev)
> gpiochip_remove(&gpio->chip);
> device_set_wakeup_capable(&pdev->dev, 0);
> pm_runtime_disable(&pdev->dev);
> + pm_runtime_put_noidle(&pdev->dev);
> }
>
> static struct platform_driver zynq_gpio_driver = {
prev parent reply other threads:[~2026-06-09 13:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 7:33 [PATCH] gpio: zynq: fix runtime PM leak on remove Ruoyu Wang
2026-06-09 11:19 ` Bartosz Golaszewski
2026-06-09 13:00 ` Pandey, Radhey Shyam [this message]
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=ff4746f5-d48f-4959-93bb-d88705f10d0a@amd.com \
--to=radheys@amd.com \
--cc=brgl@kernel.org \
--cc=harini.katakam@xilinx.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=ruoyuw560@gmail.com \
--cc=shubhrajyoti.datta@amd.com \
--cc=soren.brinkmann@xilinx.com \
--cc=srinivas.neeli@amd.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