Skip to content
Commit 95347845 authored by Guenter Roeck's avatar Guenter Roeck Committed by Eduardo Valentin
Browse files

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: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 389c0ad1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment