Skip to content

Commit ee879a5

Browse files
committed
thermal: core: Drop need_update field from struct thermal_zone_device
After previous changes, the need_update field in struct thermal_zone_device is only set and never read, so drop it. No functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Lukasz Luba <[email protected]>
1 parent c4cd42e commit ee879a5

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

drivers/thermal/thermal_core.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@ static int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
842842
if (!result) {
843843
list_add_tail(&dev->tz_node, &tz->thermal_instances);
844844
list_add_tail(&dev->cdev_node, &cdev->thermal_instances);
845-
atomic_set(&tz->need_update, 1);
846845

847846
thermal_governor_update_tz(tz, THERMAL_TZ_BIND_CDEV);
848847
}
@@ -1507,9 +1506,6 @@ thermal_zone_device_register_with_trips(const char *type,
15071506
if (result)
15081507
goto remove_id;
15091508

1510-
/* A new thermal zone needs to be updated anyway. */
1511-
atomic_set(&tz->need_update, 1);
1512-
15131509
result = dev_set_name(&tz->device, "thermal_zone%d", tz->id);
15141510
if (result) {
15151511
thermal_zone_destroy_device_groups(tz);

drivers/thermal/thermal_core.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ struct thermal_governor {
9696
trip point.
9797
* @prev_high_trip: the above current temperature if you've crossed a
9898
passive trip point.
99-
* @need_update: if equals 1, thermal_zone_device_update needs to be invoked.
10099
* @ops: operations this &thermal_zone_device supports
101100
* @tzp: thermal zone parameters
102101
* @governor: pointer to the governor for this thermal zone
@@ -130,7 +129,6 @@ struct thermal_zone_device {
130129
int passive;
131130
int prev_low_trip;
132131
int prev_high_trip;
133-
atomic_t need_update;
134132
struct thermal_zone_device_ops ops;
135133
struct thermal_zone_params *tzp;
136134
struct thermal_governor *governor;

0 commit comments

Comments
 (0)