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/arm/strongarm.c | |
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 'hw/arm/strongarm.c')
-rw-r--r-- | hw/arm/strongarm.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 0fe829b868..d7133eea6f 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -85,9 +85,7 @@ static struct { /* Interrupt Controller */ #define TYPE_STRONGARM_PIC "strongarm_pic" -typedef struct StrongARMPICState StrongARMPICState; -DECLARE_INSTANCE_CHECKER(StrongARMPICState, STRONGARM_PIC, - TYPE_STRONGARM_PIC) +OBJECT_DECLARE_SIMPLE_TYPE(StrongARMPICState, STRONGARM_PIC) struct StrongARMPICState { SysBusDevice parent_obj; @@ -254,9 +252,7 @@ static const TypeInfo strongarm_pic_info = { * f = 32 768 / (RTTR_trim + 1) */ #define TYPE_STRONGARM_RTC "strongarm-rtc" -typedef struct StrongARMRTCState StrongARMRTCState; -DECLARE_INSTANCE_CHECKER(StrongARMRTCState, STRONGARM_RTC, - TYPE_STRONGARM_RTC) +OBJECT_DECLARE_SIMPLE_TYPE(StrongARMRTCState, STRONGARM_RTC) struct StrongARMRTCState { SysBusDevice parent_obj; @@ -481,9 +477,7 @@ static const TypeInfo strongarm_rtc_sysbus_info = { #define GAFR 0x1c #define TYPE_STRONGARM_GPIO "strongarm-gpio" -typedef struct StrongARMGPIOInfo StrongARMGPIOInfo; -DECLARE_INSTANCE_CHECKER(StrongARMGPIOInfo, STRONGARM_GPIO, - TYPE_STRONGARM_GPIO) +OBJECT_DECLARE_SIMPLE_TYPE(StrongARMGPIOInfo, STRONGARM_GPIO) struct StrongARMGPIOInfo { SysBusDevice busdev; @@ -720,9 +714,7 @@ static const TypeInfo strongarm_gpio_info = { #define PPFR 0x10 #define TYPE_STRONGARM_PPC "strongarm-ppc" -typedef struct StrongARMPPCInfo StrongARMPPCInfo; -DECLARE_INSTANCE_CHECKER(StrongARMPPCInfo, STRONGARM_PPC, - TYPE_STRONGARM_PPC) +OBJECT_DECLARE_SIMPLE_TYPE(StrongARMPPCInfo, STRONGARM_PPC) struct StrongARMPPCInfo { SysBusDevice parent_obj; @@ -921,9 +913,7 @@ static const TypeInfo strongarm_ppc_info = { #define RX_FIFO_ROR (1 << 10) #define TYPE_STRONGARM_UART "strongarm-uart" -typedef struct StrongARMUARTState StrongARMUARTState; -DECLARE_INSTANCE_CHECKER(StrongARMUARTState, STRONGARM_UART, - TYPE_STRONGARM_UART) +OBJECT_DECLARE_SIMPLE_TYPE(StrongARMUARTState, STRONGARM_UART) struct StrongARMUARTState { SysBusDevice parent_obj; @@ -1353,9 +1343,7 @@ static const TypeInfo strongarm_uart_info = { /* Synchronous Serial Ports */ #define TYPE_STRONGARM_SSP "strongarm-ssp" -typedef struct StrongARMSSPState StrongARMSSPState; -DECLARE_INSTANCE_CHECKER(StrongARMSSPState, STRONGARM_SSP, - TYPE_STRONGARM_SSP) +OBJECT_DECLARE_SIMPLE_TYPE(StrongARMSSPState, STRONGARM_SSP) struct StrongARMSSPState { SysBusDevice parent_obj; |