From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Lei Liu <liulei.rjpt@vivo.com>
Cc: "Neal Liu" <neal_liu@aspeedtech.com>,
"Joel Stanley" <joel@jms.id.au>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Daniel Mack" <daniel@zonque.org>,
"Haojian Zhuang" <haojian.zhuang@gmail.com>,
"Robert Jarzmik" <robert.jarzmik@free.fr>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Daire McNamara" <daire.mcnamara@microchip.com>,
"Bin Liu" <b-liu@ti.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-aspeed@lists.ozlabs.org, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
opensource.kernel@vivo.com
Subject: Re: [PATCH 2/5] usb: pxa27x_udc: Use devm_clk_get_enabled() helpers
Date: Thu, 22 Aug 2024 12:26:51 +0800 [thread overview]
Message-ID: <2024082240-gallery-stinger-5901@gregkh> (raw)
In-Reply-To: <20240821121048.31566-3-liulei.rjpt@vivo.com>
On Wed, Aug 21, 2024 at 08:10:40PM +0800, Lei Liu wrote:
> The devm_clk_get_enabled() helpers:
> - call devm_clk_get()
> - call clk_prepare_enable() and register what is needed in order to
> call clk_disable_unprepare() when needed, as a managed resource.
>
> This simplifies the code and avoids calls to clk_disable_unprepare().
>
> Signed-off-by: Lei Liu <liulei.rjpt@vivo.com>
> ---
> drivers/usb/gadget/udc/pxa27x_udc.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
> index 1a6317e4b2a3..6e99e75f1acb 100644
> --- a/drivers/usb/gadget/udc/pxa27x_udc.c
> +++ b/drivers/usb/gadget/udc/pxa27x_udc.c
> @@ -2398,14 +2398,10 @@ static int pxa_udc_probe(struct platform_device *pdev)
> if (udc->gpiod)
> gpiod_direction_output(udc->gpiod, 0);
>
> - udc->clk = devm_clk_get(&pdev->dev, NULL);
> + udc->clk = clk_prepare_enable(&pdev->dev, NULL);
You didn't test build this code :(
next prev parent reply other threads:[~2024-08-22 4:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 12:10 [PATCH 0/5] usb drivers use devm_clk_get_enabled() helpers Lei Liu
2024-08-21 12:10 ` [PATCH 1/5] usb: aspeed_udc: Use " Lei Liu
2024-08-22 1:40 ` Andrew Jeffery
2024-08-21 12:10 ` [PATCH 2/5] usb: pxa27x_udc: " Lei Liu
2024-08-22 3:55 ` kernel test robot
2024-08-22 4:16 ` kernel test robot
2024-08-22 4:26 ` Greg Kroah-Hartman [this message]
2024-08-21 12:10 ` [PATCH 3/5] usb: r8a66597-udc: " Lei Liu
2024-08-21 12:10 ` [PATCH 4/5] usb: mpfs: " Lei Liu
2024-08-21 12:28 ` Conor Dooley
2024-08-21 12:10 ` [PATCH 5/5] usb: ux500: " Lei Liu
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=2024082240-gallery-stinger-5901@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=andrew@codeconstruct.com.au \
--cc=b-liu@ti.com \
--cc=conor.dooley@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=liulei.rjpt@vivo.com \
--cc=neal_liu@aspeedtech.com \
--cc=opensource.kernel@vivo.com \
--cc=robert.jarzmik@free.fr \
--cc=u.kleine-koenig@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).