diff options
author | Leo Yan <leo.yan@arm.com> | 2025-07-31 13:23:41 +0100 |
---|---|---|
committer | Suzuki K Poulose <suzuki.poulose@arm.com> | 2025-09-23 14:14:12 +0100 |
commit | a8f2d480f19d912f15dbac7038cd578d6b8b4d74 (patch) | |
tree | 0effebcdafc5f49559716d827d61f7e1b42b95b4 /rust/helpers/atomic.c | |
parent | 1abc1b212effe920f4729353880c8e03f1d76b4b (diff) |
coresight: Appropriately disable trace bus clocks
Some CoreSight components have trace bus clocks 'atclk' and are enabled
using clk_prepare_enable(). These clocks are not disabled when modules
exit.
As atclk is optional, use devm_clk_get_optional_enabled() to manage it.
The benefit is the driver model layer can automatically disable and
release clocks.
Check the returned value with IS_ERR() to detect errors but leave the
NULL pointer case if the clock is not found. And remove the error
handling codes which are no longer needed.
Fixes: d1839e687773 ("coresight: etm: retrieve and handle atclk")
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
Tested-by: James Clark <james.clark@linaro.org>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20250731-arm_cs_fix_clock_v4-v6-5-1dfe10bb3f6f@arm.com
Diffstat (limited to 'rust/helpers/atomic.c')
0 files changed, 0 insertions, 0 deletions