aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-25 15:20:26 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-08-27 14:04:54 -0400
commit5e748ffbbf027ad1a8fcc41a24376d63d48992ac (patch)
tree646ccaedbb9a0b5c12f8523f1ece7009fc4f9cc9 /include
parent2504f868f3e69ce923bf9997ca1051ab053859fa (diff)
ahci: Move QOM macros to header
The TYPE_* constants and the typedefs are defined in ahci.h, so we can move the type checking macros there too. 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-31-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/ide/ahci.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h
index b44e3000cf..ce2bf8a5f8 100644
--- a/include/hw/ide/ahci.h
+++ b/include/hw/ide/ahci.h
@@ -53,11 +53,14 @@ typedef struct AHCIState {
typedef struct AHCIPCIState AHCIPCIState;
#define TYPE_ICH9_AHCI "ich9-ahci"
+#define ICH_AHCI(obj) \
+ OBJECT_CHECK(AHCIPCIState, (obj), TYPE_ICH9_AHCI)
int32_t ahci_get_num_ports(PCIDevice *dev);
void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd);
#define TYPE_SYSBUS_AHCI "sysbus-ahci"
+#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_AHCI)
typedef struct SysbusAHCIState {
/*< private >*/