auxbus: Move QOM macros to header
authorEduardo Habkost <ehabkost@redhat.com>
Tue, 25 Aug 2020 19:20:33 +0000 (15:20 -0400)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 27 Aug 2020 18:04:55 +0000 (14:04 -0400)
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-38-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/misc/auxbus.c
include/hw/misc/auxbus.h

index da361baa32a258bb3452ac3c99b243811b5c0f59..6c099ae2a2dd6539a550962203ce7270bba5c0b7 100644 (file)
@@ -45,8 +45,6 @@
     }                                                                          \
 } while (0)
 
-#define TYPE_AUXTOI2C "aux-to-i2c-bridge"
-#define AUXTOI2C(obj) OBJECT_CHECK(AUXTOI2CState, (obj), TYPE_AUXTOI2C)
 
 static void aux_slave_dev_print(Monitor *mon, DeviceState *dev, int indent);
 static inline I2CBus *aux_bridge_get_i2c_bus(AUXTOI2CState *bridge);
index 15a897351755258c9b0c29e34f1e89ec83d9bfbf..041edfc9e9324fb458cecd7601383f576bee6b7b 100644 (file)
@@ -32,7 +32,10 @@ typedef struct AUXBus AUXBus;
 typedef struct AUXSlave AUXSlave;
 typedef enum AUXCommand AUXCommand;
 typedef enum AUXReply AUXReply;
+
+#define TYPE_AUXTOI2C "aux-to-i2c-bridge"
 typedef struct AUXTOI2CState AUXTOI2CState;
+#define AUXTOI2C(obj) OBJECT_CHECK(AUXTOI2CState, (obj), TYPE_AUXTOI2C)
 
 enum AUXCommand {
     WRITE_I2C = 0,