Commit b9b6ee6f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

thermal: gov_bang_bang: Call __thermal_cdev_update() directly

Instead of clearing the "updated" flag for each cooling device
affected by the trip point crossing in bang_bang_control() and
walking all thermal instances to run thermal_cdev_update() for all
of the affected cooling devices, call __thermal_cdev_update()
directly for each of them.

No intentional functional impact.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarPeter Kästle <peter@piie.net>
Reviewed-by: default avatarZhang Rui <rui.zhang@intel.com>
Cc: 6.10+ <stable@vger.kernel.org> # 6.10+
Link: https://patch.msgid.link/13583081.uLZWGnKmhe@rjwysocki.net
parent 7c626ce4
...@@ -71,12 +71,9 @@ static void bang_bang_control(struct thermal_zone_device *tz, ...@@ -71,12 +71,9 @@ static void bang_bang_control(struct thermal_zone_device *tz,
dev_dbg(&instance->cdev->device, "target=%ld\n", instance->target); dev_dbg(&instance->cdev->device, "target=%ld\n", instance->target);
mutex_lock(&instance->cdev->lock); mutex_lock(&instance->cdev->lock);
instance->cdev->updated = false; /* cdev needs update */ __thermal_cdev_update(instance->cdev);
mutex_unlock(&instance->cdev->lock); mutex_unlock(&instance->cdev->lock);
} }
list_for_each_entry(instance, &tz->thermal_instances, tz_node)
thermal_cdev_update(instance->cdev);
} }
static struct thermal_governor thermal_gov_bang_bang = { static struct thermal_governor thermal_gov_bang_bang = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment