]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ACPICA: Events: Reduce source code difference for the ACPI_EVENT_FLAG_HANDLE renaming.
authorLv Zheng <lv.zheng@intel.com>
Fri, 10 Oct 2014 02:40:05 +0000 (10:40 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 20 Oct 2014 22:39:40 +0000 (00:39 +0200)
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>
drivers/acpi/acpica/evxfevnt.c
drivers/acpi/acpica/hwgpe.c
drivers/acpi/scan.c
drivers/acpi/sysfs.c
include/acpi/actypes.h

index a8a077c971870debab1ebd707df6daf7390120b7..bb8cbf5961bf46de0cf241e18bd76cf18c6f8b6e 100644 (file)
@@ -343,7 +343,7 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
        /* Fixed event currently can be dispatched? */
 
        if (acpi_gbl_fixed_event_handlers[event].handler) {
-               local_event_status |= ACPI_EVENT_FLAG_HANDLE;
+               local_event_status |= ACPI_EVENT_FLAG_HAS_HANDLER;
        }
 
        /* Fixed event currently enabled? */
index 0302bc36287b89d1e8d47713cb65c83d9349f486..48ac7b7b59cdcf7edf954897d1ec1336dd0534bb 100644 (file)
@@ -220,7 +220,7 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,
 
        if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) !=
            ACPI_GPE_DISPATCH_NONE) {
-               local_event_status |= ACPI_EVENT_FLAG_HANDLE;
+               local_event_status |= ACPI_EVENT_FLAG_HAS_HANDLER;
        }
 
        /* Get the info block for the entire GPE register */
index ae44d8654c8248c73870727098666e2b42dec6f8..f1d96e7519cb1c03c3270b9c7920a1400bb44ebd 100644 (file)
@@ -1470,7 +1470,7 @@ static void acpi_wakeup_gpe_init(struct acpi_device *device)
        if (ACPI_FAILURE(status))
                return;
 
-       wakeup->flags.run_wake = !!(event_status & ACPI_EVENT_FLAG_HANDLE);
+       wakeup->flags.run_wake = !!(event_status & ACPI_EVENT_FLAG_HAS_HANDLER);
 }
 
 static void acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
index 38cb9782d4b871f54c646fc360f922bac03a68fd..13e577c80201bb1ce4341f9b99007e28d1a0a261 100644 (file)
@@ -537,7 +537,7 @@ static ssize_t counter_show(struct kobject *kobj,
        if (result)
                goto end;
 
-       if (!(status & ACPI_EVENT_FLAG_HANDLE))
+       if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER))
                size += sprintf(buf + size, "   invalid");
        else if (status & ACPI_EVENT_FLAG_ENABLED)
                size += sprintf(buf + size, "   enabled");
@@ -581,7 +581,7 @@ static ssize_t counter_set(struct kobject *kobj,
        if (result)
                goto end;
 
-       if (!(status & ACPI_EVENT_FLAG_HANDLE)) {
+       if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER)) {
                printk(KERN_WARNING PREFIX
                       "Can not change Invalid GPE/Fixed Event status\n");
                return -EINVAL;
index 857830d8989b89c3d58a3cbc4c5f57d5e9e7d390..7000e66f768eabd9893484d22b7b86055b8c471f 100644 (file)
@@ -729,7 +729,7 @@ typedef u32 acpi_event_status;
 #define ACPI_EVENT_FLAG_ENABLED         (acpi_event_status) 0x01
 #define ACPI_EVENT_FLAG_WAKE_ENABLED    (acpi_event_status) 0x02
 #define ACPI_EVENT_FLAG_SET             (acpi_event_status) 0x04
-#define ACPI_EVENT_FLAG_HANDLE          (acpi_event_status) 0x08
+#define ACPI_EVENT_FLAG_HAS_HANDLER     (acpi_event_status) 0x08
 
 /* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */