Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPICA: Events: Reduce source code difference for the ACPI_EVENT_FLAG_HANDLE renaming.

This patch is partial linuxized result of the following ACPICA commit:
ACPICA commit: a73b66c6aa1846d055bb6390d9c9b9902f7d804d
Subject: Add "has handler" flag to event/gpe status interfaces.
This change adds a new flag, ACPI_EVENT_FLAGS_HAS_HANDLER to the
acpi_get_event_status and acpi_get_gpe_status external interfaces. It
is set if the event/gpe currently has a handler associated with it.
This patch contains the code to rename ACPI_EVENT_FLAG_HANDLE to
ACPI_EVENT_FLAG_HAS_HANDLER, and the corresponding updates of its usages.

Link: https://github.com/acpica/acpica/commit/a73b66c6
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Lv Zheng and committed by
Rafael J. Wysocki
2f857234 a08f813e

+6 -6
+1 -1
drivers/acpi/acpica/evxfevnt.c
··· 343 343 /* Fixed event currently can be dispatched? */ 344 344 345 345 if (acpi_gbl_fixed_event_handlers[event].handler) { 346 - local_event_status |= ACPI_EVENT_FLAG_HANDLE; 346 + local_event_status |= ACPI_EVENT_FLAG_HAS_HANDLER; 347 347 } 348 348 349 349 /* Fixed event currently enabled? */
+1 -1
drivers/acpi/acpica/hwgpe.c
··· 220 220 221 221 if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) != 222 222 ACPI_GPE_DISPATCH_NONE) { 223 - local_event_status |= ACPI_EVENT_FLAG_HANDLE; 223 + local_event_status |= ACPI_EVENT_FLAG_HAS_HANDLER; 224 224 } 225 225 226 226 /* Get the info block for the entire GPE register */
+1 -1
drivers/acpi/scan.c
··· 1470 1470 if (ACPI_FAILURE(status)) 1471 1471 return; 1472 1472 1473 - wakeup->flags.run_wake = !!(event_status & ACPI_EVENT_FLAG_HANDLE); 1473 + wakeup->flags.run_wake = !!(event_status & ACPI_EVENT_FLAG_HAS_HANDLER); 1474 1474 } 1475 1475 1476 1476 static void acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
+2 -2
drivers/acpi/sysfs.c
··· 537 537 if (result) 538 538 goto end; 539 539 540 - if (!(status & ACPI_EVENT_FLAG_HANDLE)) 540 + if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER)) 541 541 size += sprintf(buf + size, " invalid"); 542 542 else if (status & ACPI_EVENT_FLAG_ENABLED) 543 543 size += sprintf(buf + size, " enabled"); ··· 581 581 if (result) 582 582 goto end; 583 583 584 - if (!(status & ACPI_EVENT_FLAG_HANDLE)) { 584 + if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER)) { 585 585 printk(KERN_WARNING PREFIX 586 586 "Can not change Invalid GPE/Fixed Event status\n"); 587 587 return -EINVAL;
+1 -1
include/acpi/actypes.h
··· 729 729 #define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01 730 730 #define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02 731 731 #define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04 732 - #define ACPI_EVENT_FLAG_HANDLE (acpi_event_status) 0x08 732 + #define ACPI_EVENT_FLAG_HAS_HANDLER (acpi_event_status) 0x08 733 733 734 734 /* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */ 735 735