[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230203174429.3375691-9-daniel.lezcano@linaro.org>
Date: Fri, 3 Feb 2023 18:44:26 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: rjw@...ysocki.net
Cc: daniel.lezcano@...aro.org, linux-acpi@...r.kernel.org,
linux-pm@...r.kernel.org, "Rafael J. Wysocki" <rafael@...nel.org>,
Zhang Rui <rui.zhang@...el.com>, Len Brown <lenb@...nel.org>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH v2 08/11] thermal/acpi: Remove active and enabled flags
The 'active' field in the struct acpi_thermal_state is never used.
The 'enabled' field of the structure acpi_thermal_state_flags is
assigned but never used.
Remove them.
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
---
drivers/acpi/thermal.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index c7c2b3d63e90..316a16ac1a09 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -117,14 +117,12 @@ struct acpi_thermal_state {
u8 critical:1;
u8 hot:1;
u8 passive:1;
- u8 active:1;
u8 reserved:4;
int active_index;
};
struct acpi_thermal_state_flags {
u8 valid:1;
- u8 enabled:1;
u8 reserved:6;
};
@@ -1138,17 +1136,14 @@ static int acpi_thermal_resume(struct device *dev)
for (i = ACPI_THERMAL_TRIP_ACTIVE; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
if (!tz->trips[i].flags.valid)
break;
- tz->trips[i].flags.enabled = 1;
+
for (j = 0; j < tz->trips[i].devices.count; j++) {
result = acpi_bus_update_power(
tz->trips[i].devices.handles[j],
&power_state);
- if (result || (power_state != ACPI_STATE_D0)) {
- tz->trips[i].flags.enabled = 0;
+ if (result || (power_state != ACPI_STATE_D0))
break;
- }
}
- tz->state.active |= tz->trips[i].flags.enabled;
}
acpi_queue_thermal_check(tz);
--
2.34.1
Powered by blists - more mailing lists