[PATCH v3 1/2] PCI: j721e: Use devm_clk_get_optional_enabled() to get the clock

Siddharth Vadapalli s-vadapalli at ti.com
Mon Oct 27 06:39:23 PDT 2025


On Mon, 2025-10-27 at 14:33 +0530, Anand Moon wrote:
> Use devm_clk_get_optional_enabled() helper instead of calling
> devm_clk_get_optional() and then clk_prepare_enable(). It simplifies
> the clk_prepare_enable() and clk_disable_unprepare() with proper error
> handling and makes the code more compact.
> The result of devm_clk_get_optional_enabled() is now assigned directly
> to pcie->refclk. This removes a superfluous local clk variable,
> improving code readability and compactness. The functionality
> remains unchanged, but the code is now more streamlined.
> 
> Cc: Siddharth Vadapalli <s-vadapalli at ti.com>
> Signed-off-by: Anand Moon <linux.amoon at gmail.com>
> ---
> v3: Clock needs to be disabled on Suspend and enabled on Resume.

Thank you for updating the patch.

Reviewed-by: Siddharth Vadapalli <s-vadapalli at ti.com>

Regards,
Siddharth.



More information about the linux-arm-kernel mailing list