vmbus: Move QOM macros to vmbus.h
authorEduardo Habkost <ehabkost@redhat.com>
Tue, 25 Aug 2020 19:20:30 +0000 (15:20 -0400)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 27 Aug 2020 18:04:54 +0000 (14:04 -0400)
Move all declarations related to TYPE_VMBUS to the same place in
vmbus.h.

This will make future conversion to OBJECT_DECLARE* easier.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20200825192110.3528606-35-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/hyperv/vmbus.c
include/hw/hyperv/vmbus-bridge.h
include/hw/hyperv/vmbus.h

index 34392e892af6228f270ec327563e854b8c572b3d..75af6b83dde7c6e226339d25127c8c1a49be1245 100644 (file)
@@ -20,9 +20,6 @@
 #include "cpu.h"
 #include "trace.h"
 
-#define TYPE_VMBUS "vmbus"
-#define VMBUS(obj) OBJECT_CHECK(VMBus, (obj), TYPE_VMBUS)
-
 enum {
     VMGPADL_INIT,
     VMGPADL_ALIVE,
index 33f93de64d8d42ffdb66ac13248c2c9ac48ce5e9..fe90bda01b04d91197d9847529459edd1f7c43db 100644 (file)
 #define HW_HYPERV_VMBUS_BRIDGE_H
 
 #include "hw/sysbus.h"
+#include "hw/hyperv/vmbus.h"
 
 #define TYPE_VMBUS_BRIDGE "vmbus-bridge"
 
-typedef struct VMBus VMBus;
-
 typedef struct VMBusBridge {
     SysBusDevice parent_obj;
 
index 40e8417eec39f2a6acf8453d3546ce117ccd6457..cd98ec24e78eb8bbb1ac3f21c178f94a7629f9eb 100644 (file)
 #define VMBUS_DEVICE_GET_CLASS(obj) \
     OBJECT_GET_CLASS(VMBusDeviceClass, (obj), TYPE_VMBUS_DEVICE)
 
+#define TYPE_VMBUS "vmbus"
+typedef struct VMBus VMBus;
+#define VMBUS(obj) OBJECT_CHECK(VMBus, (obj), TYPE_VMBUS)
+
 /*
  * Object wrapping a GPADL -- GPA Descriptor List -- an array of guest physical
  * pages, to be used for various buffers shared between the host and the guest.