[PATCH] gpu: host1x: mipi: Benefit from devm_clk_get_prepared()

Thierry Reding thierry.reding at gmail.com
Fri Apr 19 11:30:41 UTC 2024


On Tue Apr 9, 2024 at 6:50 PM CEST, Uwe Kleine-König wrote:
> When using devm_clk_get_prepared() instead of devm_clk_get() the clock
> is already returned prepared. So probe doesn't need to call
> clk_prepare() and at remove time the call to clk_unprepare() can be
> dropped. The latter makes the remove callback empty, so it can be
> dropped, too.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> ---
> Hello,
>
> the motivation for this patch is that the driver uses struct
> platform_driver::remove() which I plan to change the prototype of. Instead
> of converting the driver to the temporal .remove_new() and then back to
> the new .remove(), drop the remove callback completely.
>
> Best regards
> Uwe
>
>  drivers/gpu/host1x/mipi.c | 17 +----------------
>  1 file changed, 1 insertion(+), 16 deletions(-)

Feel free to take this in through whatever tree is most appropriate for
this ongoing work:

Acked-by: Thierry Reding <treding at nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20240419/6edfdb1c/attachment.sig>


More information about the dri-devel mailing list