diff options
author | Christophe JAILLET | 2022-08-24 10:25:11 +0200 |
---|---|---|
committer | Alexandre Belloni | 2022-10-13 00:31:57 +0200 |
commit | 8f08553e7e4370cdb8f55f0e3dc4db91ed6a4931 (patch) | |
tree | 8fb17de483bd3314868f3d2b6e1b93d9268ffbcb /mm/kmemleak.c | |
parent | 94e4603d1a262f8d79f6186d0df0379243613b95 (diff) |
rtc: k3: Use devm_clk_get_enabled() helper
The devm_clk_get_enabled() helper:
- calls devm_clk_get()
- calls clk_prepare_enable() and registers what is needed in order to
call clk_disable_unprepare() when needed, as a managed resource.
This simplifies the code, the error handling paths and avoid the need of
a dedicated function used with devm_add_action_or_reset().
Based on my test with allyesconfig, this reduces the .o size from:
text data bss dec hex filename
12843 4804 64 17711 452f drivers/rtc/rtc-ti-k3.o
down to:
12523 4804 64 17391 43ef drivers/rtc/rtc-ti-k3.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/601288834ab71c0fddde7eedd8cdb8001254ed7e.1661329498.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'mm/kmemleak.c')
0 files changed, 0 insertions, 0 deletions