[PATCH] spi: meson-spifc: use devm_pm_runtime_set_active_enabled

Mark Brown broonie at kernel.org
Thu Jul 30 05:05:43 PDT 2026


On Wed, Jul 22, 2026 at 08:09:17PM +0800, Felix Gu wrote:
> Use devm_pm_runtime_set_active_enabled to replace
> pm_runtime_set_active() + pm_runtime_enable() and drop the out_pm
> error label and now-unnecessary remove function.

> -static void meson_spifc_remove(struct platform_device *pdev)
> -{
> -	pm_runtime_get_sync(&pdev->dev);
> -	pm_runtime_disable(&pdev->dev);
> -	pm_runtime_put_noidle(&pdev->dev);
>  }

We still need the pm_runtime_get_sync() here since the driver uses
devm_get_clk_enabled() - we need to exit remove() with the clock
enabled.  The other changes look OK.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20260730/4a17d1fe/attachment.sig>


More information about the linux-amlogic mailing list