Skip to content

Commit

Permalink
thermal: Use thermal_tripless_zone_device_register()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Sep 5, 2023
1 parent d332db8 commit cbcd51e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions drivers/power/supply/power_supply_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,8 +1309,8 @@ static int psy_register_thermal(struct power_supply *psy)
struct thermal_zone_params tzp = {
.no_hwmon = IS_ENABLED(CONFIG_POWER_SUPPLY_HWMON)
};
psy->tzd = thermal_zone_device_register(psy->desc->name,
0, 0, psy, &psy_tzd_ops, &tzp, 0, 0);
psy->tzd = thermal_tripless_zone_device_register(psy->desc->name,
psy, &psy_tzd_ops, &tzp);
if (IS_ERR(psy->tzd))
return PTR_ERR(psy->tzd);
ret = thermal_zone_device_enable(psy->tzd);
Expand Down
5 changes: 3 additions & 2 deletions drivers/thermal/armada_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,9 @@ static int armada_thermal_probe(struct platform_device *pdev)
/* Wait the sensors to be valid */
armada_wait_sensor_validity(priv);

tz = thermal_zone_device_register(priv->zone_name, 0, 0, priv,
&legacy_ops, NULL, 0, 0);
tz = thermal_tripless_zone_device_register(priv->zone_name,
priv, &legacy_ops,
NULL);
if (IS_ERR(tz)) {
dev_err(&pdev->dev,
"Failed to register thermal zone device\n");
Expand Down
4 changes: 2 additions & 2 deletions drivers/thermal/dove_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ static int dove_thermal_probe(struct platform_device *pdev)
return ret;
}

thermal = thermal_zone_device_register("dove_thermal", 0, 0,
priv, &ops, NULL, 0, 0);
thermal = thermal_tripless_zone_device_register("dove_thermal", priv,
&ops, NULL);
if (IS_ERR(thermal)) {
dev_err(&pdev->dev,
"Failed to register thermal zone device\n");
Expand Down
6 changes: 3 additions & 3 deletions drivers/thermal/intel/int340x_thermal/int3400_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,9 @@ static int int3400_thermal_probe(struct platform_device *pdev)

evaluate_odvp(priv);

priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
priv, &int3400_thermal_ops,
&int3400_thermal_params, 0, 0);
priv->thermal = thermal_tripless_zone_device_register("INT3400 Thermal", priv,
&int3400_thermal_ops,
&int3400_thermal_params);
if (IS_ERR(priv->thermal)) {
result = PTR_ERR(priv->thermal);
goto free_art_trt;
Expand Down
4 changes: 2 additions & 2 deletions drivers/thermal/kirkwood_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ static int kirkwood_thermal_probe(struct platform_device *pdev)
if (IS_ERR(priv->sensor))
return PTR_ERR(priv->sensor);

thermal = thermal_zone_device_register("kirkwood_thermal", 0, 0,
priv, &ops, NULL, 0, 0);
thermal = thermal_tripless_zone_device_register("kirkwood_thermal",
priv, &ops, NULL);
if (IS_ERR(thermal)) {
dev_err(&pdev->dev,
"Failed to register thermal zone device\n");
Expand Down
4 changes: 2 additions & 2 deletions drivers/thermal/spear_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ static int spear_thermal_probe(struct platform_device *pdev)
stdev->flags = val;
writel_relaxed(stdev->flags, stdev->thermal_base);

spear_thermal = thermal_zone_device_register("spear_thermal", 0, 0,
stdev, &ops, NULL, 0, 0);
spear_thermal = thermal_tripless_zone_device_register("spear_thermal",
stdev, &ops, NULL);
if (IS_ERR(spear_thermal)) {
dev_err(&pdev->dev, "thermal zone device is NULL\n");
ret = PTR_ERR(spear_thermal);
Expand Down

0 comments on commit cbcd51e

Please sign in to comment.