aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pwm-fan.c
diff options
context:
space:
mode:
authorChristophe JAILLET <[email protected]>2022-08-24 10:25:13 +0000
committerGuenter Roeck <[email protected]>2022-09-19 13:17:05 +0000
commit907f2e4f1731d2b97ba3aa9f0590379768ba71e8 (patch)
tree6770eeefd4979ccf8c43eec536c40c550b90a7ea /drivers/hwmon/pwm-fan.c
parenthwmon: (dell-smm) Improve warning messages (diff)
downloadkernel-907f2e4f1731d2b97ba3aa9f0590379768ba71e8.tar.gz
kernel-907f2e4f1731d2b97ba3aa9f0590379768ba71e8.zip
hwmon: (sparx5) 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 2419 1472 0 3891 f33 drivers/hwmon/sparx5-temp.o down to: 2155 1472 0 3627 e2b drivers/hwmon/sparx5-temp.o Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/cfe4c965074b5ecbe03830b05e038b4594c7b970.1661336689.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
0 files changed, 0 insertions, 0 deletions