thermal: Use thermal_tripless_zone_device_register()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 30 Aug 2023 16:14:57 +0000 (18:14 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 5 Sep 2023 19:42:18 +0000 (21:42 +0200)
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>
drivers/power/supply/power_supply_core.c
drivers/thermal/armada_thermal.c
drivers/thermal/dove_thermal.c
drivers/thermal/intel/int340x_thermal/int3400_thermal.c
drivers/thermal/kirkwood_thermal.c
drivers/thermal/spear_thermal.c

index 4aa466c945e2574d16811216fdd17aecfd14511e..0b69fb7bafd85da9b51a9d40db7a24553447bf5b 100644 (file)
@@ -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);
index 9f6dc4fc9112d028ae00fdd6393e0021a0ab1062..f00765bfc22e822e5cde477338f2e0438e284008 100644 (file)
@@ -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");
index 9954040d1d2cca5dd589cc99d41977c6a2646b9b..7a18cb960bee0ad3dc98c9d24647ba356a6ca33c 100644 (file)
@@ -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");
index ddd600820f683e25e4345e04c02f09dd60648b6f..ffc2871a021cf63c274ddeb593351f1de0312c8d 100644 (file)
@@ -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;
index 668747bd86ef67581053b826e3c153223b50e08e..acb10d24256d2a6304c49f0c398b51de3d4a301d 100644 (file)
@@ -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");
index 6e78616a576ead65b1044e438b2f3b359da57cb2..96d99289799a164b0562b2fb61781c62a54ac96e 100644 (file)
@@ -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);