]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
hwmon: (aspeed-pwm-tacho) Use devm_thermal_of_cooling_device_register
authorGuenter Roeck <linux@roeck-us.net>
Thu, 18 Apr 2019 19:58:16 +0000 (12:58 -0700)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 14 May 2019 14:00:44 +0000 (07:00 -0700)
commit389c0ad1d61ec5790174ecb0f01eac13423a18e1
tree11e6ad708c4ec5164ca4d72b730960786ebaf5b8
parente380ea8117ce8c83c5da7063a3587a728132de0b
hwmon: (aspeed-pwm-tacho) Use devm_thermal_of_cooling_device_register

Use devm_thermal_of_cooling_device_register() to register the cooling
device. As a side effect, this fixes a driver bug:
thermal_cooling_device_unregister() was not called on removal.

Fixes: f198907d2ff6d ("hwmon: (aspeed-pwm-tacho) cooling device support.")
Cc: Mykola Kostenok <c_mykolak@mellanox.com>
Cc: Joel Stanley <joel@jms.id.au>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Patrick Venture <venture@google.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/hwmon/aspeed-pwm-tacho.c