Skip to content

Commit

Permalink
thermal: gov_bang_bang: Call __thermal_cdev_update() directly
Browse files Browse the repository at this point in the history
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: Rafael J. Wysocki <[email protected]>
Acked-by: Peter Kästle <[email protected]>
Reviewed-by: Zhang Rui <[email protected]>
Cc: 6.10+ <[email protected]> # 6.10+
Link: https://patch.msgid.link/[email protected]
  • Loading branch information
rafaeljw committed Aug 16, 2024
1 parent 7c626ce commit b9b6ee6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/thermal/gov_bang_bang.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,9 @@ static void bang_bang_control(struct thermal_zone_device *tz,
dev_dbg(&instance->cdev->device, "target=%ld\n", instance->target);

mutex_lock(&instance->cdev->lock);
instance->cdev->updated = false; /* cdev needs update */
__thermal_cdev_update(instance->cdev);
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 = {
Expand Down

0 comments on commit b9b6ee6

Please sign in to comment.