ICH9 SMB: make TYPE_ICH9_SMB_DEVICE macro public
authorEfimov Vasily <real@ispras.ru>
Wed, 22 Jun 2016 12:24:53 +0000 (15:24 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 29 Jun 2016 12:03:46 +0000 (14:03 +0200)
ICH9 SMB bridge can be created using qdev API despite existence of helper
function. The type name is needed for such creation. Using a preprocessor
alias instead the string type name itself is preferable.

The patch makes the alias accessible through the header.

Signed-off-by: Efimov Vasily <real@ispras.ru>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i2c/smbus_ich9.c
include/hw/i386/ich9.h

index 498f03e8355fbb078cdc15743f90781655efd767..48fab2262506102b86d8a56a7b2384e04bd0044d 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "hw/i386/ich9.h"
 
-#define TYPE_ICH9_SMB_DEVICE "ICH9 SMB"
 #define ICH9_SMB_DEVICE(obj) \
      OBJECT_CHECK(ICH9SMBState, (obj), TYPE_ICH9_SMB_DEVICE)
 
index 88233c3077a0b0e03f5a1345ad09768383e2cc28..f1294bc5051f74a667e8c7a18b167610d32dcc1e 100644 (file)
@@ -208,6 +208,8 @@ Object *ich9_lpc_find(void);
 
 
 /* D31:F3 SMBus controller */
+#define TYPE_ICH9_SMB_DEVICE "ICH9 SMB"
+
 #define ICH9_A2_SMB_REVISION                    0x02
 #define ICH9_SMB_PI                             0x00