Skip to content

Commit 067345f

Browse files
tititiou36rafaeljw
authored andcommitted
thermal: intel: Clean up zone_trips[] initialization in int340x_thermal_zone_add()
'zone_trips[]' has just been allocated with kzalloc(), so .flags is known to be 0, so assign THERMAL_TRIP_FLAG_RW_TEMP directly to it. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://patch.msgid.link/cceb7f8864c43f046cf1c19c3bbcc38a7a57adc5.1740426540.git.christophe.jaillet@wanadoo.fr [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 063ab16 commit 067345f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev,
143143
for (i = 0; i < trip_cnt; i++) {
144144
zone_trips[i].type = THERMAL_TRIP_PASSIVE;
145145
zone_trips[i].temperature = THERMAL_TEMP_INVALID;
146-
zone_trips[i].flags |= THERMAL_TRIP_FLAG_RW_TEMP;
146+
zone_trips[i].flags = THERMAL_TRIP_FLAG_RW_TEMP;
147147
zone_trips[i].priv = THERMAL_INT_TO_TRIP_PRIV(i);
148148
}
149149

0 commit comments

Comments
 (0)