aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Qiang <liq3ea@gmail.com>2018-09-13 22:11:11 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-02 19:09:12 +0200
commit8371158bbaff91234cfba1c401ff523e04785b0f (patch)
tree3a622521954defe9b7727584b338313207cab8b8
parent5b8063c40672f19716705f1342dc32e5030c2f43 (diff)
downloadqemu-8371158bbaff91234cfba1c401ff523e04785b0f.zip
qemu-8371158bbaff91234cfba1c401ff523e04785b0f.tar.gz
qemu-8371158bbaff91234cfba1c401ff523e04785b0f.tar.bz2
hw: edu: replace device name with macro
Just as other devices do. Signed-off-by: Li Qiang <liq3ea@gmail.com> Message-Id: <1536901871-2729-1-git-send-email-liq3ea@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hw/misc/edu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/misc/edu.c b/hw/misc/edu.c
index df26a4d..0687ffd 100644
--- a/hw/misc/edu.c
+++ b/hw/misc/edu.c
@@ -30,7 +30,8 @@
#include "qemu/main-loop.h" /* iothread mutex */
#include "qapi/visitor.h"
-#define EDU(obj) OBJECT_CHECK(EduState, obj, "edu")
+#define TYPE_PCI_EDU_DEVICE "edu"
+#define EDU(obj) OBJECT_CHECK(EduState, obj, TYPE_PCI_EDU_DEVICE)
#define FACT_IRQ 0x00000001
#define DMA_IRQ 0x00000100
@@ -414,7 +415,7 @@ static void pci_edu_register_types(void)
{ },
};
static const TypeInfo edu_info = {
- .name = "edu",
+ .name = TYPE_PCI_EDU_DEVICE,
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(EduState),
.instance_init = edu_instance_init,