From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ze Huang <huang.ze@linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc3: Don't call clk_bulk_disable_unprepare() twice
Date: Mon, 29 Sep 2025 23:36:27 +0000 [thread overview]
Message-ID: <20250929233625.jpk2sxjxhj2kghfb@synopsys.com> (raw)
In-Reply-To: <371860315a5c1ef6e800fa825e4c23ce335a55e2.1759170517.git.christophe.jaillet@wanadoo.fr>
On Mon, Sep 29, 2025, Christophe JAILLET wrote:
> devm_clk_bulk_get_all_enabled() is used in the probe, so
> clk_bulk_disable_unprepare() should not be called explicitly in the remove
> function.
Why not? The clk_bulk_disable_unprepare() is to disable and unprepare
the clocks, not freeing the clocks.
BR,
Thinh
>
> Fixes: e0b6dc00c701 ("usb: dwc3: add generic driver to support flattened")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/usb/dwc3/dwc3-generic-plat.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-generic-plat.c b/drivers/usb/dwc3/dwc3-generic-plat.c
> index d96b20570002..f8ad79c08c4e 100644
> --- a/drivers/usb/dwc3/dwc3-generic-plat.c
> +++ b/drivers/usb/dwc3/dwc3-generic-plat.c
> @@ -85,11 +85,8 @@ static int dwc3_generic_probe(struct platform_device *pdev)
> static void dwc3_generic_remove(struct platform_device *pdev)
> {
> struct dwc3 *dwc = platform_get_drvdata(pdev);
> - struct dwc3_generic *dwc3g = to_dwc3_generic(dwc);
>
> dwc3_core_remove(dwc);
> -
> - clk_bulk_disable_unprepare(dwc3g->num_clocks, dwc3g->clks);
> }
>
> static int dwc3_generic_suspend(struct device *dev)
> --
> 2.51.0
>
next prev parent reply other threads:[~2025-09-30 0:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-29 18:28 Christophe JAILLET
2025-09-29 23:36 ` Thinh Nguyen [this message]
2025-09-29 23:46 ` Thinh Nguyen
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=20250929233625.jpk2sxjxhj2kghfb@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=gregkh@linuxfoundation.org \
--cc=huang.ze@linux.dev \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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
all inboxes | Powered by JetHome®