[PATCH v5 15/17] spi: uniphier: Simplify clock handling with devm_clk_get_enabled()

Mark Brown broonie at kernel.org
Mon Mar 23 14:49:30 PDT 2026


On Thu, Mar 19, 2026 at 10:04:11AM +0800, Pei Xiao wrote:
> Replace devm_clk_get() followed by clk_prepare_enable() with
> devm_clk_get_enabled() for the clock. This removes the need for
> explicit clock enable and disable calls, as the managed API automatically
> handles clock disabling on device removal or probe failure.

This breaks an allmodconfig build:

/build/stage/linux/drivers/spi/spi-uniphier.c: In function ‘uniphier_spi_remove’
:
/build/stage/linux/drivers/spi/spi-uniphier.c:773:35: error: unused variable ‘pr
iv’ [-Werror=unused-variable]
  773 |         struct uniphier_spi_priv *priv = spi_controller_get_devdata(host
);
      |                                   ^~~~
-------------- 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-mediatek/attachments/20260323/9b18ca46/attachment-0001.sig>


More information about the Linux-mediatek mailing list