[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/32] vmport: identify vmport type by macro TYPE_VMP
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 03/32] vmport: identify vmport type by macro TYPE_VMPORT |
Date: |
Tue, 28 Jun 2016 19:33:33 +0200 |
From: Efimov Vasily <address@hidden>
Currently vmport device is identified by the string literal. Using a
preprocessor alias instead is preferable.
Signed-off-by: Efimov Vasily <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/misc/vmport.c | 1 -
include/hw/i386/pc.h | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/misc/vmport.c b/hw/misc/vmport.c
index 6896789..c763811 100644
--- a/hw/misc/vmport.c
+++ b/hw/misc/vmport.c
@@ -36,7 +36,6 @@
#define VMPORT_ENTRIES 0x2c
#define VMPORT_MAGIC 0x564D5868
-#define TYPE_VMPORT "vmport"
#define VMPORT(obj) OBJECT_CHECK(VMPortState, (obj), TYPE_VMPORT)
typedef struct VMPortState
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 948ed0c..bc85054 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -201,11 +201,12 @@ typedef struct GSIState {
void gsi_handler(void *opaque, int n, int level);
/* vmport.c */
+#define TYPE_VMPORT "vmport"
typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address);
static inline void vmport_init(ISABus *bus)
{
- isa_create_simple(bus, "vmport");
+ isa_create_simple(bus, TYPE_VMPORT);
}
void vmport_register(unsigned char command, VMPortReadFunc *func, void
*opaque);
--
2.7.4
- [Qemu-devel] [PULL 00/32] Misc patches for QEMU soft freeze, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 01/32] ide: move headers to include folder, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 02/32] pcspk: convert "pit" property type from ptr to link, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 03/32] vmport: identify vmport type by macro TYPE_VMPORT,
Paolo Bonzini <=
- [Qemu-devel] [PULL 05/32] Q35: implement property interfece to several parameters, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 06/32] pc_q35: configure Q35 instance using properties, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 04/32] pflash: make TYPE_CFI_PFLASH0{1, 2} macros public, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 07/32] pckbd: handle A20 IRQ as GPIO, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 08/32] port92: handle A20 IRQ as GPIO, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 09/32] ICH9 SMB: make TYPE_ICH9_SMB_DEVICE macro public, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 11/32] ich9: clean up ich9_lpc_update_pic/ich9_lpc_update_apic and callers, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 12/32] ich9: unify pic and ioapic IRQ vectors, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 10/32] ich9: call ich9_lpc_update_pic for disabled pirqs, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 13/32] ICH9 LPC: handle GSI as qdev GPIO, Paolo Bonzini, 2016/06/28