]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
thermal: core: Drop tz field from struct thermal_instance
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 22 Aug 2024 19:27:06 +0000 (21:27 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Aug 2024 13:56:29 +0000 (15:56 +0200)
After recent changes, it is only used for printing a debug message
in __thermal_cdev_update() which arguably is not worth preserving.

Drop it along with the dev_dbg() statement using it.

Link: https://lore.kernel.org/linux-pm/4a8d8f5a-122d-4c26-b8d6-76a65e42216b@linaro.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/4934182.GXAFRqVoOG@rjwysocki.net
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h
drivers/thermal/thermal_helpers.c

index 8c52746c5eba5958af1ab76048061fe3a8c72ea2..4187f207bce91afc9bac834880644bdb7ff4794a 100644 (file)
@@ -804,7 +804,7 @@ static int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
        dev = kzalloc(sizeof(*dev), GFP_KERNEL);
        if (!dev)
                return -ENOMEM;
-       dev->tz = tz;
+
        dev->cdev = cdev;
        dev->trip = trip;
        dev->upper = cool_spec->upper;
index c983e7ff6ed04f2a1127df638bed2d2671283e8e..9b19b614a1bc3143e99e26e0cc0448324ef29c30 100644 (file)
@@ -213,7 +213,6 @@ int get_tz_trend(struct thermal_zone_device *tz, const struct thermal_trip *trip
 struct thermal_instance {
        int id;
        char name[THERMAL_NAME_LENGTH];
-       struct thermal_zone_device *tz;
        struct thermal_cooling_device *cdev;
        const struct thermal_trip *trip;
        bool initialized;
index be477b153addf9fd3c07ded082282a5ffb6d10b4..dc374a7a1a659fd8472dce7c40b8e4d061b08873 100644 (file)
@@ -181,8 +181,6 @@ void __thermal_cdev_update(struct thermal_cooling_device *cdev)
 
        /* Make sure cdev enters the deepest cooling state */
        list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) {
-               dev_dbg(&cdev->device, "zone%d->target=%lu\n",
-                       instance->tz->id, instance->target);
                if (instance->target == THERMAL_NO_TARGET)
                        continue;
                if (instance->target > target)