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

From: Siddharth Vadapalli
Date: Mon Oct 27 2025 - 09:41:34 EST


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@xxxxxx>
> Signed-off-by: Anand Moon <linux.amoon@xxxxxxxxx>
> ---
> v3: Clock needs to be disabled on Suspend and enabled on Resume.

Thank you for updating the patch.

Reviewed-by: Siddharth Vadapalli <s-vadapalli@xxxxxx>

Regards,
Siddharth.