diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-16 14:25:19 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-18 14:12:32 -0400 |
commit | 8063396bf3459a810d24e3efd6110b8480f0de5b (patch) | |
tree | 40f85f15d7016e3ee66916a59be53d2b2c71510a /include/hw/ide/ahci.h | |
parent | a489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (diff) |
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
This converts existing DECLARE_INSTANCE_CHECKER usage to
OBJECT_DECLARE_SIMPLE_TYPE when possible.
$ ./scripts/codeconverter/converter.py -i \
--pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]')
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Paul Durrant <paul@xen.org>
Message-Id: <20200916182519.415636-6-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw/ide/ahci.h')
-rw-r--r-- | include/hw/ide/ahci.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index da3cddcc65..b1bdf648f8 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -51,19 +51,15 @@ typedef struct AHCIState { AddressSpace *as; } AHCIState; -typedef struct AHCIPCIState AHCIPCIState; #define TYPE_ICH9_AHCI "ich9-ahci" -DECLARE_INSTANCE_CHECKER(AHCIPCIState, ICH9_AHCI, - TYPE_ICH9_AHCI) +OBJECT_DECLARE_SIMPLE_TYPE(AHCIPCIState, 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" -typedef struct SysbusAHCIState SysbusAHCIState; -DECLARE_INSTANCE_CHECKER(SysbusAHCIState, SYSBUS_AHCI, - TYPE_SYSBUS_AHCI) +OBJECT_DECLARE_SIMPLE_TYPE(SysbusAHCIState, SYSBUS_AHCI) struct SysbusAHCIState { /*< private >*/ @@ -75,9 +71,7 @@ struct SysbusAHCIState { }; #define TYPE_ALLWINNER_AHCI "allwinner-ahci" -typedef struct AllwinnerAHCIState AllwinnerAHCIState; -DECLARE_INSTANCE_CHECKER(AllwinnerAHCIState, ALLWINNER_AHCI, - TYPE_ALLWINNER_AHCI) +OBJECT_DECLARE_SIMPLE_TYPE(AllwinnerAHCIState, ALLWINNER_AHCI) #define ALLWINNER_AHCI_MMIO_OFF 0x80 #define ALLWINNER_AHCI_MMIO_SIZE 0x80 |