Skip to content

Commit cbcd51e

Browse files
committed
thermal: Use thermal_tripless_zone_device_register()
All of the remaining callers of thermal_zone_device_register() can use thermal_tripless_zone_device_register(), so make them do so in order to allow the former to be dropped. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent d332db8 commit cbcd51e

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

drivers/power/supply/power_supply_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,8 +1309,8 @@ static int psy_register_thermal(struct power_supply *psy)
13091309
struct thermal_zone_params tzp = {
13101310
.no_hwmon = IS_ENABLED(CONFIG_POWER_SUPPLY_HWMON)
13111311
};
1312-
psy->tzd = thermal_zone_device_register(psy->desc->name,
1313-
0, 0, psy, &psy_tzd_ops, &tzp, 0, 0);
1312+
psy->tzd = thermal_tripless_zone_device_register(psy->desc->name,
1313+
psy, &psy_tzd_ops, &tzp);
13141314
if (IS_ERR(psy->tzd))
13151315
return PTR_ERR(psy->tzd);
13161316
ret = thermal_zone_device_enable(psy->tzd);

drivers/thermal/armada_thermal.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,9 @@ static int armada_thermal_probe(struct platform_device *pdev)
876876
/* Wait the sensors to be valid */
877877
armada_wait_sensor_validity(priv);
878878

879-
tz = thermal_zone_device_register(priv->zone_name, 0, 0, priv,
880-
&legacy_ops, NULL, 0, 0);
879+
tz = thermal_tripless_zone_device_register(priv->zone_name,
880+
priv, &legacy_ops,
881+
NULL);
881882
if (IS_ERR(tz)) {
882883
dev_err(&pdev->dev,
883884
"Failed to register thermal zone device\n");

drivers/thermal/dove_thermal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ static int dove_thermal_probe(struct platform_device *pdev)
139139
return ret;
140140
}
141141

142-
thermal = thermal_zone_device_register("dove_thermal", 0, 0,
143-
priv, &ops, NULL, 0, 0);
142+
thermal = thermal_tripless_zone_device_register("dove_thermal", priv,
143+
&ops, NULL);
144144
if (IS_ERR(thermal)) {
145145
dev_err(&pdev->dev,
146146
"Failed to register thermal zone device\n");

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,9 @@ static int int3400_thermal_probe(struct platform_device *pdev)
609609

610610
evaluate_odvp(priv);
611611

612-
priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
613-
priv, &int3400_thermal_ops,
614-
&int3400_thermal_params, 0, 0);
612+
priv->thermal = thermal_tripless_zone_device_register("INT3400 Thermal", priv,
613+
&int3400_thermal_ops,
614+
&int3400_thermal_params);
615615
if (IS_ERR(priv->thermal)) {
616616
result = PTR_ERR(priv->thermal);
617617
goto free_art_trt;

drivers/thermal/kirkwood_thermal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ static int kirkwood_thermal_probe(struct platform_device *pdev)
7171
if (IS_ERR(priv->sensor))
7272
return PTR_ERR(priv->sensor);
7373

74-
thermal = thermal_zone_device_register("kirkwood_thermal", 0, 0,
75-
priv, &ops, NULL, 0, 0);
74+
thermal = thermal_tripless_zone_device_register("kirkwood_thermal",
75+
priv, &ops, NULL);
7676
if (IS_ERR(thermal)) {
7777
dev_err(&pdev->dev,
7878
"Failed to register thermal zone device\n");

drivers/thermal/spear_thermal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ static int spear_thermal_probe(struct platform_device *pdev)
122122
stdev->flags = val;
123123
writel_relaxed(stdev->flags, stdev->thermal_base);
124124

125-
spear_thermal = thermal_zone_device_register("spear_thermal", 0, 0,
126-
stdev, &ops, NULL, 0, 0);
125+
spear_thermal = thermal_tripless_zone_device_register("spear_thermal",
126+
stdev, &ops, NULL);
127127
if (IS_ERR(spear_thermal)) {
128128
dev_err(&pdev->dev, "thermal zone device is NULL\n");
129129
ret = PTR_ERR(spear_thermal);

0 commit comments

Comments
 (0)