]> www.infradead.org Git - users/jedix/linux-maple.git/commit
phy: rockchip-pcie: Use devm_clk_get_enabled() helper
authorAnand Moon <linux.amoon@gmail.com>
Sat, 12 Oct 2024 07:19:04 +0000 (12:49 +0530)
committerVinod Koul <vkoul@kernel.org>
Wed, 4 Dec 2024 13:27:07 +0000 (18:57 +0530)
commite96397db55e5fbe290ff1462ddf6c24ed94eb7df
tree3efec392f93fb4778a6fea349ee935454d3b888c
parent84de918083d09500d93d991d8989addfaae1611e
phy: rockchip-pcie: Use devm_clk_get_enabled() helper

Use devm_clk_get_enabled() instead of devm_clk_get() to make the code
cleaner and avoid calling clk_disable_unprepare(), as this is exactly
what this function does. Use the dev_err_probe() helper to simplify
error handling during probe.

Refactor the mutex handling in the rockchip_pcie_phy_init() function
to improve code readability and maintainability. The goto statement has
been removed, and the mutex_unlock call is now directly within the
conditional block.

Return the result of reset_control_assert() function, with 0 indicating
success and an error code indicating failure

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Link: https://lore.kernel.org/r/20241012071919.3726-3-linux.amoon@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/rockchip/phy-rockchip-pcie.c