diff options
Diffstat (limited to 'drivers/hwmon/hwmon.c')
| -rw-r--r-- | drivers/hwmon/hwmon.c | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index 2e2cd79d89eb..4218750d5a66 100644 --- a/drivers/hwmon/hwmon.c +++ b/drivers/hwmon/hwmon.c @@ -151,9 +151,9 @@ static DEFINE_IDA(hwmon_ida);   * between hwmon and thermal_sys modules.   */  #ifdef CONFIG_THERMAL_OF -static int hwmon_thermal_get_temp(void *data, int *temp) +static int hwmon_thermal_get_temp(struct thermal_zone_device *tz, int *temp)  { -	struct hwmon_thermal_data *tdata = data; +	struct hwmon_thermal_data *tdata = tz->devdata;  	struct hwmon_device *hwdev = to_hwmon_device(tdata->dev);  	int ret;  	long t; @@ -168,9 +168,9 @@ static int hwmon_thermal_get_temp(void *data, int *temp)  	return 0;  } -static int hwmon_thermal_set_trips(void *data, int low, int high) +static int hwmon_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)  { -	struct hwmon_thermal_data *tdata = data; +	struct hwmon_thermal_data *tdata = tz->devdata;  	struct hwmon_device *hwdev = to_hwmon_device(tdata->dev);  	const struct hwmon_chip_info *chip = hwdev->chip;  	const struct hwmon_channel_info **info = chip->info; @@ -203,7 +203,7 @@ static int hwmon_thermal_set_trips(void *data, int low, int high)  	return 0;  } -static const struct thermal_zone_of_device_ops hwmon_thermal_ops = { +static const struct thermal_zone_device_ops hwmon_thermal_ops = {  	.get_temp = hwmon_thermal_get_temp,  	.set_trips = hwmon_thermal_set_trips,  }; @@ -227,8 +227,8 @@ static int hwmon_thermal_add_sensor(struct device *dev, int index)  	tdata->dev = dev;  	tdata->index = index; -	tzd = devm_thermal_zone_of_sensor_register(dev, index, tdata, -						   &hwmon_thermal_ops); +	tzd = devm_thermal_of_zone_register(dev, index, tdata, +					    &hwmon_thermal_ops);  	if (IS_ERR(tzd)) {  		if (PTR_ERR(tzd) != -ENODEV)  			return PTR_ERR(tzd);  |