Skip to content

Commit 4a62d58

Browse files
committed
thermal: core: Eliminate writable trip points masks
All of the thermal_zone_device_register_with_trips() callers pass zero writable trip points masks to it, so drop the mask argument from that function and update all of its callers accordingly. This also removes the artificial trip points per zone limit of 32, related to using writable trip points masks. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent 83c2d44 commit 4a62d58

File tree

18 files changed

+19
-47
lines changed

18 files changed

+19
-47
lines changed

drivers/acpi/thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz,
665665
tz->thermal_zone = thermal_zone_device_register_with_trips("acpitz",
666666
trip_table,
667667
trip_count,
668-
0, tz,
668+
tz,
669669
&acpi_thermal_zone_ops,
670670
NULL,
671671
passive_delay,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int cxgb4_thermal_init(struct adapter *adap)
6060

6161
snprintf(ch_tz_name, sizeof(ch_tz_name), "cxgb4_%s", adap->name);
6262
ch_thermal->tzdev = thermal_zone_device_register_with_trips(ch_tz_name, &trip, num_trip,
63-
0, adap,
63+
adap,
6464
&cxgb4_thermal_ops,
6565
NULL, 0, 0);
6666
if (IS_ERR(ch_thermal->tzdev)) {

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ mlxsw_thermal_module_tz_init(struct mlxsw_thermal_module *module_tz)
423423
module_tz->tzdev = thermal_zone_device_register_with_trips(tz_name,
424424
module_tz->trips,
425425
MLXSW_THERMAL_NUM_TRIPS,
426-
0,
427426
module_tz,
428427
&mlxsw_thermal_module_ops,
429428
&mlxsw_thermal_params,
@@ -551,7 +550,6 @@ mlxsw_thermal_gearbox_tz_init(struct mlxsw_thermal_module *gearbox_tz)
551550
gearbox_tz->tzdev = thermal_zone_device_register_with_trips(tz_name,
552551
gearbox_tz->trips,
553552
MLXSW_THERMAL_NUM_TRIPS,
554-
0,
555553
gearbox_tz,
556554
&mlxsw_thermal_gearbox_ops,
557555
&mlxsw_thermal_params, 0,
@@ -776,7 +774,6 @@ int mlxsw_thermal_init(struct mlxsw_core *core,
776774
thermal->tzdev = thermal_zone_device_register_with_trips("mlxsw",
777775
thermal->trips,
778776
MLXSW_THERMAL_NUM_TRIPS,
779-
0,
780777
thermal,
781778
&mlxsw_thermal_ops,
782779
&mlxsw_thermal_params, 0,

drivers/net/wireless/intel/iwlwifi/mvm/tt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,6 @@ static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm)
694694
mvm->tz_device.tzone = thermal_zone_device_register_with_trips(name,
695695
mvm->tz_device.trips,
696696
IWL_MAX_DTS_TRIPS,
697-
0,
698697
mvm, &tzone_ops,
699698
NULL, 0, 0);
700699
if (IS_ERR(mvm->tz_device.tzone)) {

drivers/platform/x86/acerhdf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ static int __init acerhdf_register_thermal(void)
678678
return -EINVAL;
679679

680680
thz_dev = thermal_zone_device_register_with_trips("acerhdf", trips, ARRAY_SIZE(trips),
681-
0, NULL, &acerhdf_dev_ops,
681+
NULL, &acerhdf_dev_ops,
682682
&acerhdf_zone_params, 0,
683683
(kernelmode) ? interval*1000 : 0);
684684
if (IS_ERR(thz_dev))

drivers/thermal/da9062-thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static int da9062_thermal_probe(struct platform_device *pdev)
197197
mutex_init(&thermal->lock);
198198

199199
thermal->zone = thermal_zone_device_register_with_trips(thermal->config->name,
200-
trips, ARRAY_SIZE(trips), 0, thermal,
200+
trips, ARRAY_SIZE(trips), thermal,
201201
&da9062_thermal_ops, NULL, pp_tmp,
202202
0);
203203
if (IS_ERR(thermal->zone)) {

drivers/thermal/imx_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ static int imx_thermal_probe(struct platform_device *pdev)
701701
data->tz = thermal_zone_device_register_with_trips("imx_thermal_zone",
702702
trips,
703703
ARRAY_SIZE(trips),
704-
0, data,
704+
data,
705705
&imx_tz_ops, NULL,
706706
IMX_PASSIVE_DELAY,
707707
IMX_POLLING_DELAY);

drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev,
171171
int34x_zone->zone = thermal_zone_device_register_with_trips(
172172
acpi_device_bid(adev),
173173
zone_trips, trip_cnt,
174-
0, int34x_zone,
174+
int34x_zone,
175175
&zone_ops,
176176
&int340x_thermal_params,
177177
0, 0);

drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev, const struct pci_device_
290290
psv_trip.temperature = get_trip_temp(pci_info);
291291

292292
pci_info->tzone = thermal_zone_device_register_with_trips("TCPU_PCI", &psv_trip,
293-
1, 0, pci_info,
293+
1, pci_info,
294294
&tzone_ops,
295295
&tzone_params, 0, 0);
296296
if (IS_ERR(pci_info->tzone)) {

drivers/thermal/intel/intel_pch_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static int intel_pch_thermal_probe(struct pci_dev *pdev,
237237

238238
ptd->tzd = thermal_zone_device_register_with_trips(board_names[board_id],
239239
ptd_trips, nr_trips,
240-
0, ptd, &tzd_ops,
240+
ptd, &tzd_ops,
241241
NULL, 0, 0);
242242
if (IS_ERR(ptd->tzd)) {
243243
dev_err(&pdev->dev, "Failed to register thermal zone %s\n",

0 commit comments

Comments
 (0)