qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 7/9] acpi: replace opencoded notify codes with named


From: Igor Mammedov
Subject: [Qemu-devel] [PATCH 7/9] acpi: replace opencoded notify codes with named values
Date: Mon, 8 Dec 2014 16:08:06 +0000

Signed-off-by: Igor Mammedov <address@hidden>
---
 hw/i386/acpi-build.c             | 4 ++--
 include/hw/acpi/acpi_gen_utils.h | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 0f6202d..a33d130 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -840,10 +840,10 @@ static void build_pci_bus_end(PCIBus *bus, void 
*bus_state)
             build_append_namestring(method, "BNUM");
             build_append_namestring(method, "DVNT");
             build_append_namestring(method, "PCIU");
-            build_append_int(method, 1); /* Device Check */
+            build_append_int(method, ACPI_DEV_CHK);
             build_append_namestring(method, "DVNT");
             build_append_namestring(method, "PCID");
-            build_append_int(method, 3); /* Eject Request */
+            build_append_int(method, ACPI_DEV_EJ);
         }
 
         /* Notify about child bus events in any case */
diff --git a/include/hw/acpi/acpi_gen_utils.h b/include/hw/acpi/acpi_gen_utils.h
index fd50625..ce76dc1 100644
--- a/include/hw/acpi/acpi_gen_utils.h
+++ b/include/hw/acpi/acpi_gen_utils.h
@@ -5,6 +5,12 @@
 #include <glib.h>
 #include "qemu/compiler.h"
 
+/* ACPI 5.0: table "Device Object Notification Values" */
+enum {
+    ACPI_DEV_CHK = 1,
+    ACPI_DEV_EJ = 3,
+};
+
 GArray *build_alloc_array(void);
 void build_free_array(GArray *array);
 void build_prepend_byte(GArray *array, uint8_t val);
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]