diff options
| author | Uwe Kleine-König <[email protected]> | 2023-03-02 10:12:51 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-03-09 17:31:53 +0100 |
| commit | 9263271a61fcb07b8a30379e785391415d10aa72 (patch) | |
| tree | ad5a651e499ccb62dd58c73e086a162589a74c9a /tools/perf/scripts/python/mem-phys-addr.py | |
| parent | 7ef1a2c1c9dffa177ecc3ea50b7f5ee63a621137 (diff) | |
misc: sram: Improve and simplify clk handling
The current code tries to get an associated clk, ignores any errors in the
process and if there is a clock enables it unconditionally for the whole
lifetime of the sram device.
Instead use an "optional" variant of devm_clk_get() which handles the case
where no clk is needed for the sram device and do proper error handling
for the remaining error cases. Also use an "enabled" variant of
devm_clk_get() to simplify. With that .probe() is the only function using
struct sram_dev::clk, so it can be replaced by a local variable.
Signed-off-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions