hwmon: (mlxreg-fan) Use devm_thermal_of_cooling_device_register
authorGuenter Roeck <linux@roeck-us.net>
Thu, 18 Apr 2019 19:58:18 +0000 (12:58 -0700)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 14 May 2019 14:00:46 +0000 (07:00 -0700)
commit9ebe010e566e9300bf3a7bb4ebfeb3f4deb72aa6
treec677b0ef48276f0ba0bb9d64df4871158451e1dc
parent9534784550ab02a4394f499ff60765e89bc88f22
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>
drivers/hwmon/mlxreg-fan.c