Skip to content

Commit d4d8516

Browse files
committed
Merge back Intel thermal driver changes for 6.4-rc1.
2 parents ae817e6 + 85b5212 commit d4d8516

67 files changed

Lines changed: 223 additions & 249 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/acpi/thermal.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
498498

499499
static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp)
500500
{
501-
struct acpi_thermal *tz = thermal->devdata;
501+
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
502502
int result;
503503

504504
if (!tz)
@@ -516,7 +516,7 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp)
516516
static int thermal_get_trip_type(struct thermal_zone_device *thermal,
517517
int trip, enum thermal_trip_type *type)
518518
{
519-
struct acpi_thermal *tz = thermal->devdata;
519+
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
520520
int i;
521521

522522
if (!tz || trip < 0)
@@ -560,7 +560,7 @@ static int thermal_get_trip_type(struct thermal_zone_device *thermal,
560560
static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
561561
int trip, int *temp)
562562
{
563-
struct acpi_thermal *tz = thermal->devdata;
563+
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
564564
int i;
565565

566566
if (!tz || trip < 0)
@@ -613,7 +613,7 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
613613
static int thermal_get_crit_temp(struct thermal_zone_device *thermal,
614614
int *temperature)
615615
{
616-
struct acpi_thermal *tz = thermal->devdata;
616+
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
617617

618618
if (tz->trips.critical.flags.valid) {
619619
*temperature = deci_kelvin_to_millicelsius_with_offset(
@@ -628,7 +628,7 @@ static int thermal_get_crit_temp(struct thermal_zone_device *thermal,
628628
static int thermal_get_trend(struct thermal_zone_device *thermal,
629629
int trip, enum thermal_trend *trend)
630630
{
631-
struct acpi_thermal *tz = thermal->devdata;
631+
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
632632
enum thermal_trip_type type;
633633
int i;
634634

@@ -670,7 +670,7 @@ static int thermal_get_trend(struct thermal_zone_device *thermal,
670670

671671
static void acpi_thermal_zone_device_hot(struct thermal_zone_device *thermal)
672672
{
673-
struct acpi_thermal *tz = thermal->devdata;
673+
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
674674

675675
acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
676676
dev_name(&tz->device->dev),
@@ -679,7 +679,7 @@ static void acpi_thermal_zone_device_hot(struct thermal_zone_device *thermal)
679679

680680
static void acpi_thermal_zone_device_critical(struct thermal_zone_device *thermal)
681681
{
682-
struct acpi_thermal *tz = thermal->devdata;
682+
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
683683

684684
acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
685685
dev_name(&tz->device->dev),
@@ -693,7 +693,7 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
693693
bool bind)
694694
{
695695
struct acpi_device *device = cdev->devdata;
696-
struct acpi_thermal *tz = thermal->devdata;
696+
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
697697
struct acpi_device *dev;
698698
acpi_handle handle;
699699
int i;
@@ -842,7 +842,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
842842
goto acpi_bus_detach;
843843

844844
dev_info(&tz->device->dev, "registered as thermal_zone%d\n",
845-
tz->thermal_zone->id);
845+
thermal_zone_device_id(tz->thermal_zone));
846846

847847
return 0;
848848

drivers/ata/ahci_imx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ static int __sata_ahci_read_temperature(void *dev, int *temp)
418418

419419
static int sata_ahci_read_temperature(struct thermal_zone_device *tz, int *temp)
420420
{
421-
return __sata_ahci_read_temperature(tz->devdata, temp);
421+
return __sata_ahci_read_temperature(thermal_zone_device_priv(tz), temp);
422422
}
423423

424424
static ssize_t sata_ahci_show_temp(struct device *dev,

drivers/hwmon/hwmon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static DEFINE_IDA(hwmon_ida);
154154
#ifdef CONFIG_THERMAL_OF
155155
static int hwmon_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
156156
{
157-
struct hwmon_thermal_data *tdata = tz->devdata;
157+
struct hwmon_thermal_data *tdata = thermal_zone_device_priv(tz);
158158
struct hwmon_device *hwdev = to_hwmon_device(tdata->dev);
159159
int ret;
160160
long t;
@@ -171,7 +171,7 @@ static int hwmon_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
171171

172172
static int hwmon_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)
173173
{
174-
struct hwmon_thermal_data *tdata = tz->devdata;
174+
struct hwmon_thermal_data *tdata = thermal_zone_device_priv(tz);
175175
struct hwmon_device *hwdev = to_hwmon_device(tdata->dev);
176176
const struct hwmon_chip_info *chip = hwdev->chip;
177177
const struct hwmon_channel_info **info = chip->info;

drivers/hwmon/pmbus/pmbus_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ struct pmbus_thermal_data {
12721272

12731273
static int pmbus_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
12741274
{
1275-
struct pmbus_thermal_data *tdata = tz->devdata;
1275+
struct pmbus_thermal_data *tdata = thermal_zone_device_priv(tz);
12761276
struct pmbus_sensor *sensor = tdata->sensor;
12771277
struct pmbus_data *pmbus_data = tdata->pmbus_data;
12781278
struct i2c_client *client = to_i2c_client(pmbus_data->dev);

drivers/hwmon/scmi-hwmon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static int scmi_hwmon_thermal_get_temp(struct thermal_zone_device *tz,
141141
{
142142
int ret;
143143
long value;
144-
struct scmi_thermal_sensor *th_sensor = tz->devdata;
144+
struct scmi_thermal_sensor *th_sensor = thermal_zone_device_priv(tz);
145145

146146
ret = scmi_hwmon_read_scaled_value(th_sensor->ph, th_sensor->info,
147147
&value);
@@ -220,7 +220,7 @@ static int scmi_thermal_sensor_register(struct device *dev,
220220
sensor->name);
221221
} else {
222222
dev_dbg(dev, "Sensor '%s' attached to thermal zone ID:%d\n",
223-
sensor->name, tzd->id);
223+
sensor->name, thermal_zone_device_id(tzd));
224224
}
225225

226226
return 0;

drivers/hwmon/scpi-hwmon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void scpi_scale_reading(u64 *value, struct sensor_data *sensor)
6464

6565
static int scpi_read_temp(struct thermal_zone_device *tz, int *temp)
6666
{
67-
struct scpi_thermal_zone *zone = tz->devdata;
67+
struct scpi_thermal_zone *zone = thermal_zone_device_priv(tz);
6868
struct scpi_sensors *scpi_sensors = zone->scpi_sensors;
6969
struct scpi_ops *scpi_ops = scpi_sensors->scpi_ops;
7070
struct sensor_data *sensor = &scpi_sensors->data[zone->sensor_id];

drivers/iio/adc/sun4i-gpadc-iio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ static int sun4i_gpadc_runtime_resume(struct device *dev)
414414

415415
static int sun4i_gpadc_get_temp(struct thermal_zone_device *tz, int *temp)
416416
{
417-
struct sun4i_gpadc_iio *info = tz->devdata;
417+
struct sun4i_gpadc_iio *info = thermal_zone_device_priv(tz);
418418
int val, scale, offset;
419419

420420
if (sun4i_gpadc_temp_read(info->indio_dev, &val))

drivers/input/touchscreen/sun4i-ts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static int sun4i_get_temp(const struct sun4i_ts_data *ts, int *temp)
194194

195195
static int sun4i_get_tz_temp(struct thermal_zone_device *tz, int *temp)
196196
{
197-
return sun4i_get_temp(tz->devdata, temp);
197+
return sun4i_get_temp(thermal_zone_device_priv(tz), temp);
198198
}
199199

200200
static const struct thermal_zone_device_ops sun4i_ts_tz_ops = {

drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
static int cxgb4_thermal_get_temp(struct thermal_zone_device *tzdev,
1313
int *temp)
1414
{
15-
struct adapter *adap = tzdev->devdata;
15+
struct adapter *adap = thermal_zone_device_priv(tzdev);
1616
u32 param, val;
1717
int ret;
1818

drivers/net/ethernet/mellanox/mlxsw/core_thermal.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ mlxsw_thermal_module_trips_update(struct device *dev, struct mlxsw_core *core,
176176

177177
if (crit_temp > emerg_temp) {
178178
dev_warn(dev, "%s : Critical threshold %d is above emergency threshold %d\n",
179-
tz->tzdev->type, crit_temp, emerg_temp);
179+
thermal_zone_device_type(tz->tzdev), crit_temp, emerg_temp);
180180
return 0;
181181
}
182182

@@ -200,7 +200,7 @@ mlxsw_thermal_module_trips_update(struct device *dev, struct mlxsw_core *core,
200200
static int mlxsw_thermal_bind(struct thermal_zone_device *tzdev,
201201
struct thermal_cooling_device *cdev)
202202
{
203-
struct mlxsw_thermal *thermal = tzdev->devdata;
203+
struct mlxsw_thermal *thermal = thermal_zone_device_priv(tzdev);
204204
struct device *dev = thermal->bus_info->dev;
205205
int i, err;
206206

@@ -226,7 +226,7 @@ static int mlxsw_thermal_bind(struct thermal_zone_device *tzdev,
226226
static int mlxsw_thermal_unbind(struct thermal_zone_device *tzdev,
227227
struct thermal_cooling_device *cdev)
228228
{
229-
struct mlxsw_thermal *thermal = tzdev->devdata;
229+
struct mlxsw_thermal *thermal = thermal_zone_device_priv(tzdev);
230230
struct device *dev = thermal->bus_info->dev;
231231
int i;
232232
int err;
@@ -248,7 +248,7 @@ static int mlxsw_thermal_unbind(struct thermal_zone_device *tzdev,
248248
static int mlxsw_thermal_get_temp(struct thermal_zone_device *tzdev,
249249
int *p_temp)
250250
{
251-
struct mlxsw_thermal *thermal = tzdev->devdata;
251+
struct mlxsw_thermal *thermal = thermal_zone_device_priv(tzdev);
252252
struct device *dev = thermal->bus_info->dev;
253253
char mtmp_pl[MLXSW_REG_MTMP_LEN];
254254
int temp;
@@ -280,7 +280,7 @@ static struct thermal_zone_device_ops mlxsw_thermal_ops = {
280280
static int mlxsw_thermal_module_bind(struct thermal_zone_device *tzdev,
281281
struct thermal_cooling_device *cdev)
282282
{
283-
struct mlxsw_thermal_module *tz = tzdev->devdata;
283+
struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
284284
struct mlxsw_thermal *thermal = tz->parent;
285285
int i, j, err;
286286

@@ -309,7 +309,7 @@ static int mlxsw_thermal_module_bind(struct thermal_zone_device *tzdev,
309309
static int mlxsw_thermal_module_unbind(struct thermal_zone_device *tzdev,
310310
struct thermal_cooling_device *cdev)
311311
{
312-
struct mlxsw_thermal_module *tz = tzdev->devdata;
312+
struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
313313
struct mlxsw_thermal *thermal = tz->parent;
314314
int i;
315315
int err;
@@ -355,7 +355,7 @@ mlxsw_thermal_module_temp_and_thresholds_get(struct mlxsw_core *core,
355355
static int mlxsw_thermal_module_temp_get(struct thermal_zone_device *tzdev,
356356
int *p_temp)
357357
{
358-
struct mlxsw_thermal_module *tz = tzdev->devdata;
358+
struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
359359
struct mlxsw_thermal *thermal = tz->parent;
360360
int temp, crit_temp, emerg_temp;
361361
struct device *dev;
@@ -390,7 +390,7 @@ static struct thermal_zone_device_ops mlxsw_thermal_module_ops = {
390390
static int mlxsw_thermal_gearbox_temp_get(struct thermal_zone_device *tzdev,
391391
int *p_temp)
392392
{
393-
struct mlxsw_thermal_module *tz = tzdev->devdata;
393+
struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
394394
struct mlxsw_thermal *thermal = tz->parent;
395395
char mtmp_pl[MLXSW_REG_MTMP_LEN];
396396
u16 index;

0 commit comments

Comments
 (0)