* [PATCH v1] ACPI: thermal: Drop enabled flag from struct acpi_thermal_active
@ 2023-07-25 18:06 Rafael J. Wysocki
0 siblings, 0 replies; only message in thread
From: Rafael J. Wysocki @ 2023-07-25 18:06 UTC (permalink / raw)
To: Linux ACPI; +Cc: LKML, Zhang Rui, Srinivas Pandruvada, Linux PM
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
The enabled field of struct acpi_thermal_active is only updated and never
read, so drop it along with the related code.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/thermal.c | 6 ------
1 file changed, 6 deletions(-)
Index: linux-pm/drivers/acpi/thermal.c
===================================================================
--- linux-pm.orig/drivers/acpi/thermal.c
+++ linux-pm/drivers/acpi/thermal.c
@@ -121,7 +121,6 @@ struct acpi_thermal_active {
struct acpi_handle_list devices;
unsigned long temperature;
bool valid;
- bool enabled;
};
struct acpi_thermal_trips {
@@ -1084,15 +1083,10 @@ static int acpi_thermal_resume(struct de
if (!tz->trips.active[i].valid)
break;
- tz->trips.active[i].enabled = true;
for (j = 0; j < tz->trips.active[i].devices.count; j++) {
result = acpi_bus_update_power(
tz->trips.active[i].devices.handles[j],
&power_state);
- if (result || (power_state != ACPI_STATE_D0)) {
- tz->trips.active[i].enabled = false;
- break;
- }
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-25 18:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 18:06 [PATCH v1] ACPI: thermal: Drop enabled flag from struct acpi_thermal_active Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).