mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-14 05:55:17 +00:00
hwmon: (gpio-fan) Use devm_thermal_of_cooling_device_register
Call devm_thermal_of_cooling_device_register() to register the cooling device. Also use devm_add_action_or_reset() to stop the fan on device removal. This fixes a race condition since the fan was stopped before the hwmon device was removed. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
This commit is contained in:
parent
389c0ad1d6
commit
9534784550
1 changed files with 9 additions and 16 deletions
Loading…
Add table
Add a link
Reference in a new issue