commit | 9534784550ab02a4394f499ff60765e89bc88f22 | [log] [tgz] |
---|---|---|
author | Guenter Roeck <linux@roeck-us.net> | Thu Apr 18 12:58:17 2019 -0700 |
committer | Eduardo Valentin <edubezval@gmail.com> | Tue May 14 07:00:45 2019 -0700 |
tree | a98ed4ffa76c8805a196eda519af90e1c5e54ba6 | |
parent | 389c0ad1d61ec5790174ecb0f01eac13423a18e1 [diff] |
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>