Skip to content

Commit 1d4590f

Browse files
committed
Merge tag 'acpi-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fixes from Rafael Wysocki: "These fix two regressions, one related to ACPI power resources management and one that broke ACPI tools compilation. Specifics: - Stop turning off unused ACPI power resources in an unknown state to address a regression introduced during the 5.14 cycle (Rafael Wysocki). - Fix an ACPI tools build issue introduced recently when the minimal stdarg.h was added (Miguel Bernal Marin)" * tag 'acpi-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PM: Do not turn off power resources in unknown state ACPI: tools: fix compilation error
2 parents cd82c4a + 7a74890 commit 1d4590f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

drivers/acpi/power.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,13 +1035,8 @@ void acpi_turn_off_unused_power_resources(void)
10351035
list_for_each_entry_reverse(resource, &acpi_power_resource_list, list_node) {
10361036
mutex_lock(&resource->resource_lock);
10371037

1038-
/*
1039-
* Turn off power resources in an unknown state too, because the
1040-
* platform firmware on some system expects the OS to turn off
1041-
* power resources without any users unconditionally.
1042-
*/
10431038
if (!resource->ref_count &&
1044-
resource->state != ACPI_POWER_RESOURCE_STATE_OFF) {
1039+
resource->state == ACPI_POWER_RESOURCE_STATE_ON) {
10451040
acpi_handle_debug(resource->device.handle, "Turning OFF\n");
10461041
__acpi_power_off(resource);
10471042
}

include/acpi/platform/acgcc.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,14 @@ typedef __builtin_va_list va_list;
2222
#define va_arg(v, l) __builtin_va_arg(v, l)
2323
#define va_copy(d, s) __builtin_va_copy(d, s)
2424
#else
25+
#ifdef __KERNEL__
2526
#include <linux/stdarg.h>
26-
#endif
27-
#endif
27+
#else
28+
/* Used to build acpi tools */
29+
#include <stdarg.h>
30+
#endif /* __KERNEL__ */
31+
#endif /* ACPI_USE_BUILTIN_STDARG */
32+
#endif /* ! va_arg */
2833

2934
#define ACPI_INLINE __inline__
3035

0 commit comments

Comments
 (0)