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 /hw/isa | |
parent | a489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (diff) | |
download | qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.zip qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.gz qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.bz2 |
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 'hw/isa')
-rw-r--r-- | hw/isa/i82378.c | 4 | ||||
-rw-r--r-- | hw/isa/piix4.c | 4 | ||||
-rw-r--r-- | hw/isa/vt82c686.c | 16 |
3 files changed, 6 insertions, 18 deletions
diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index 1dcf525..8285b06 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c @@ -27,9 +27,7 @@ #include "qom/object.h" #define TYPE_I82378 "i82378" -typedef struct I82378State I82378State; -DECLARE_INSTANCE_CHECKER(I82378State, I82378, - TYPE_I82378) +OBJECT_DECLARE_SIMPLE_TYPE(I82378State, I82378) struct I82378State { PCIDevice parent_obj; diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 8e3ac84..a50d978 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -52,10 +52,8 @@ struct PIIX4State { MemoryRegion rcr_mem; uint8_t rcr; }; -typedef struct PIIX4State PIIX4State; -DECLARE_INSTANCE_CHECKER(PIIX4State, PIIX4_PCI_DEVICE, - TYPE_PIIX4_PCI_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(PIIX4State, PIIX4_PCI_DEVICE) static void piix4_isa_reset(DeviceState *dev) { diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 1e6b48b..b3170c7 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -48,11 +48,9 @@ struct VT82C686BState { MemoryRegion superio; SuperIOConfig superio_conf; }; -typedef struct VT82C686BState VT82C686BState; #define TYPE_VT82C686B_DEVICE "VT82C686B" -DECLARE_INSTANCE_CHECKER(VT82C686BState, VT82C686B_DEVICE, - TYPE_VT82C686B_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BState, VT82C686B_DEVICE) static void superio_ioport_writeb(void *opaque, hwaddr addr, uint64_t data, unsigned size) @@ -169,29 +167,23 @@ struct VT686PMState { PMSMBus smb; uint32_t smb_io_base; }; -typedef struct VT686PMState VT686PMState; struct VT686AC97State { PCIDevice dev; }; -typedef struct VT686AC97State VT686AC97State; struct VT686MC97State { PCIDevice dev; }; -typedef struct VT686MC97State VT686MC97State; #define TYPE_VT82C686B_PM_DEVICE "VT82C686B_PM" -DECLARE_INSTANCE_CHECKER(VT686PMState, VT82C686B_PM_DEVICE, - TYPE_VT82C686B_PM_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(VT686PMState, VT82C686B_PM_DEVICE) #define TYPE_VT82C686B_MC97_DEVICE "VT82C686B_MC97" -DECLARE_INSTANCE_CHECKER(VT686MC97State, VT82C686B_MC97_DEVICE, - TYPE_VT82C686B_MC97_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(VT686MC97State, VT82C686B_MC97_DEVICE) #define TYPE_VT82C686B_AC97_DEVICE "VT82C686B_AC97" -DECLARE_INSTANCE_CHECKER(VT686AC97State, VT82C686B_AC97_DEVICE, - TYPE_VT82C686B_AC97_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(VT686AC97State, VT82C686B_AC97_DEVICE) static void pm_update_sci(VT686PMState *s) { |