Re: [PATCH v2 01/17] spi: axiado: Use helper function devm_clk_get_enabled()

From: Mark Brown

Date: Fri Mar 13 2026 - 08:56:05 EST


On Fri, Mar 13, 2026 at 02:08:17PM +0800, Pei Xiao wrote:
> devm_clk_get() and clk_prepare_enable() can now be replaced by
> devm_clk_get_enabled() when driver enables the clocks. Moreover, it is no
> longer necessary to unprepare and disable the clocks explicitly.
> Simplify code.

> - xspi->pclk = devm_clk_get(&pdev->dev, "pclk");
> + xspi->pclk = devm_clk_get_enabled(&pdev->dev, "pclk");
> if (IS_ERR(xspi->pclk)) {

This doesn't update the remove function which while it doesn't free the
clock does disable it. Please check all the other patches for similar
issues too.

Attachment: signature.asc
Description: PGP signature