hwmon: (mlxreg-fan) Use devm_thermal_of_cooling_device_register

Call devm_thermal_of_cooling_device_register() to register the cooling
device. Also introduce struct device *dev = &pdev->dev; to make the code
easier to read.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
This commit is contained in:
Guenter Roeck 2019-04-18 12:58:18 -07:00 • committed by Eduardo Valentin
commit 9ebe010e56