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 | |
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')
-rw-r--r-- | hw/arm/collie.c | 4 | ||||
-rw-r--r-- | hw/arm/highbank.c | 4 | ||||
-rw-r--r-- | hw/arm/integratorcp.c | 12 | ||||
-rw-r--r-- | hw/arm/microbit.c | 4 | ||||
-rw-r--r-- | hw/arm/musicpal.c | 32 | ||||
-rw-r--r-- | hw/arm/palm.c | 4 | ||||
-rw-r--r-- | hw/arm/pxa2xx.c | 12 | ||||
-rw-r--r-- | hw/arm/pxa2xx_gpio.c | 4 | ||||
-rw-r--r-- | hw/arm/pxa2xx_pic.c | 4 | ||||
-rw-r--r-- | hw/arm/sbsa-ref.c | 4 | ||||
-rw-r--r-- | hw/arm/spitz.c | 20 | ||||
-rw-r--r-- | hw/arm/stellaris.c | 8 | ||||
-rw-r--r-- | hw/arm/strongarm.c | 24 | ||||
-rw-r--r-- | hw/arm/tosa.c | 8 | ||||
-rw-r--r-- | hw/arm/versatilepb.c | 4 | ||||
-rw-r--r-- | hw/arm/xilinx_zynq.c | 4 | ||||
-rw-r--r-- | hw/arm/xlnx-versal-virt.c | 4 | ||||
-rw-r--r-- | hw/arm/xlnx-zcu102.c | 4 | ||||
-rw-r--r-- | hw/arm/z2.c | 8 |
19 files changed, 42 insertions, 126 deletions
diff --git a/hw/arm/collie.c b/hw/arm/collie.c index a49f4a1c7c..8df31e2793 100644 --- a/hw/arm/collie.c +++ b/hw/arm/collie.c @@ -25,11 +25,9 @@ struct CollieMachineState { StrongARMState *sa1110; }; -typedef struct CollieMachineState CollieMachineState; #define TYPE_COLLIE_MACHINE MACHINE_TYPE_NAME("collie") -DECLARE_INSTANCE_CHECKER(CollieMachineState, COLLIE_MACHINE, - TYPE_COLLIE_MACHINE) +OBJECT_DECLARE_SIMPLE_TYPE(CollieMachineState, COLLIE_MACHINE) static struct arm_boot_info collie_binfo = { .loader_start = SA_SDCS0, diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index e2ace803ef..7da984171b 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -156,9 +156,7 @@ static const MemoryRegionOps hb_mem_ops = { }; #define TYPE_HIGHBANK_REGISTERS "highbank-regs" -typedef struct HighbankRegsState HighbankRegsState; -DECLARE_INSTANCE_CHECKER(HighbankRegsState, HIGHBANK_REGISTERS, - TYPE_HIGHBANK_REGISTERS) +OBJECT_DECLARE_SIMPLE_TYPE(HighbankRegsState, HIGHBANK_REGISTERS) struct HighbankRegsState { /*< private >*/ diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index 19989b61b9..de670b08a9 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -29,9 +29,7 @@ #include "qom/object.h" #define TYPE_INTEGRATOR_CM "integrator_core" -typedef struct IntegratorCMState IntegratorCMState; -DECLARE_INSTANCE_CHECKER(IntegratorCMState, INTEGRATOR_CM, - TYPE_INTEGRATOR_CM) +OBJECT_DECLARE_SIMPLE_TYPE(IntegratorCMState, INTEGRATOR_CM) struct IntegratorCMState { /*< private >*/ @@ -328,9 +326,7 @@ static void integratorcm_realize(DeviceState *d, Error **errp) /* Primary interrupt controller. */ #define TYPE_INTEGRATOR_PIC "integrator_pic" -typedef struct icp_pic_state icp_pic_state; -DECLARE_INSTANCE_CHECKER(icp_pic_state, INTEGRATOR_PIC, - TYPE_INTEGRATOR_PIC) +OBJECT_DECLARE_SIMPLE_TYPE(icp_pic_state, INTEGRATOR_PIC) struct icp_pic_state { /*< private >*/ @@ -468,9 +464,7 @@ static void icp_pic_init(Object *obj) /* CP control registers. */ #define TYPE_ICP_CONTROL_REGS "icp-ctrl-regs" -typedef struct ICPCtrlRegsState ICPCtrlRegsState; -DECLARE_INSTANCE_CHECKER(ICPCtrlRegsState, ICP_CONTROL_REGS, - TYPE_ICP_CONTROL_REGS) +OBJECT_DECLARE_SIMPLE_TYPE(ICPCtrlRegsState, ICP_CONTROL_REGS) struct ICPCtrlRegsState { /*< private >*/ diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c index 9a4a3d357a..0947491cb9 100644 --- a/hw/arm/microbit.c +++ b/hw/arm/microbit.c @@ -26,12 +26,10 @@ struct MicrobitMachineState { NRF51State nrf51; MicrobitI2CState i2c; }; -typedef struct MicrobitMachineState MicrobitMachineState; #define TYPE_MICROBIT_MACHINE MACHINE_TYPE_NAME("microbit") -DECLARE_INSTANCE_CHECKER(MicrobitMachineState, MICROBIT_MACHINE, - TYPE_MICROBIT_MACHINE) +OBJECT_DECLARE_SIMPLE_TYPE(MicrobitMachineState, MICROBIT_MACHINE) static void microbit_init(MachineState *machine) { diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 2117a04171..5eb3f969fb 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -155,9 +155,7 @@ typedef struct mv88w8618_rx_desc { } mv88w8618_rx_desc; #define TYPE_MV88W8618_ETH "mv88w8618_eth" -typedef struct mv88w8618_eth_state mv88w8618_eth_state; -DECLARE_INSTANCE_CHECKER(mv88w8618_eth_state, MV88W8618_ETH, - TYPE_MV88W8618_ETH) +OBJECT_DECLARE_SIMPLE_TYPE(mv88w8618_eth_state, MV88W8618_ETH) struct mv88w8618_eth_state { /*< private >*/ @@ -485,9 +483,7 @@ static const TypeInfo mv88w8618_eth_info = { #define MP_LCD_TEXTCOLOR 0xe0e0ff /* RRGGBB */ #define TYPE_MUSICPAL_LCD "musicpal_lcd" -typedef struct musicpal_lcd_state musicpal_lcd_state; -DECLARE_INSTANCE_CHECKER(musicpal_lcd_state, MUSICPAL_LCD, - TYPE_MUSICPAL_LCD) +OBJECT_DECLARE_SIMPLE_TYPE(musicpal_lcd_state, MUSICPAL_LCD) struct musicpal_lcd_state { /*< private >*/ @@ -703,9 +699,7 @@ static const TypeInfo musicpal_lcd_info = { #define MP_PIC_ENABLE_CLR 0x0C #define TYPE_MV88W8618_PIC "mv88w8618_pic" -typedef struct mv88w8618_pic_state mv88w8618_pic_state; -DECLARE_INSTANCE_CHECKER(mv88w8618_pic_state, MV88W8618_PIC, - TYPE_MV88W8618_PIC) +OBJECT_DECLARE_SIMPLE_TYPE(mv88w8618_pic_state, MV88W8618_PIC) struct mv88w8618_pic_state { /*< private >*/ @@ -841,9 +835,7 @@ typedef struct mv88w8618_timer_state { } mv88w8618_timer_state; #define TYPE_MV88W8618_PIT "mv88w8618_pit" -typedef struct mv88w8618_pit_state mv88w8618_pit_state; -DECLARE_INSTANCE_CHECKER(mv88w8618_pit_state, MV88W8618_PIT, - TYPE_MV88W8618_PIT) +OBJECT_DECLARE_SIMPLE_TYPE(mv88w8618_pit_state, MV88W8618_PIT) struct mv88w8618_pit_state { /*< private >*/ @@ -1009,9 +1001,7 @@ static const TypeInfo mv88w8618_pit_info = { #define MP_FLASHCFG_CFGR0 0x04 #define TYPE_MV88W8618_FLASHCFG "mv88w8618_flashcfg" -typedef struct mv88w8618_flashcfg_state mv88w8618_flashcfg_state; -DECLARE_INSTANCE_CHECKER(mv88w8618_flashcfg_state, MV88W8618_FLASHCFG, - TYPE_MV88W8618_FLASHCFG) +OBJECT_DECLARE_SIMPLE_TYPE(mv88w8618_flashcfg_state, MV88W8618_FLASHCFG) struct mv88w8618_flashcfg_state { /*< private >*/ @@ -1100,11 +1090,9 @@ struct MusicPalMiscState { SysBusDevice parent_obj; MemoryRegion iomem; }; -typedef struct MusicPalMiscState MusicPalMiscState; #define TYPE_MUSICPAL_MISC "musicpal-misc" -DECLARE_INSTANCE_CHECKER(MusicPalMiscState, MUSICPAL_MISC, - TYPE_MUSICPAL_MISC) +OBJECT_DECLARE_SIMPLE_TYPE(MusicPalMiscState, MUSICPAL_MISC) static uint64_t musicpal_misc_read(void *opaque, hwaddr offset, unsigned size) @@ -1209,9 +1197,7 @@ static void mv88w8618_wlan_realize(DeviceState *dev, Error **errp) #define MP_OE_LCD_BRIGHTNESS 0x0007 #define TYPE_MUSICPAL_GPIO "musicpal_gpio" -typedef struct musicpal_gpio_state musicpal_gpio_state; -DECLARE_INSTANCE_CHECKER(musicpal_gpio_state, MUSICPAL_GPIO, - TYPE_MUSICPAL_GPIO) +OBJECT_DECLARE_SIMPLE_TYPE(musicpal_gpio_state, MUSICPAL_GPIO) struct musicpal_gpio_state { /*< private >*/ @@ -1460,9 +1446,7 @@ static const TypeInfo musicpal_gpio_info = { #define MP_KEY_BTN_NAVIGATION (1 << 7) #define TYPE_MUSICPAL_KEY "musicpal_key" -typedef struct musicpal_key_state musicpal_key_state; -DECLARE_INSTANCE_CHECKER(musicpal_key_state, MUSICPAL_KEY, - TYPE_MUSICPAL_KEY) +OBJECT_DECLARE_SIMPLE_TYPE(musicpal_key_state, MUSICPAL_KEY) struct musicpal_key_state { /*< private >*/ diff --git a/hw/arm/palm.c b/hw/arm/palm.c index abc6495489..4e3dc5fbbf 100644 --- a/hw/arm/palm.c +++ b/hw/arm/palm.c @@ -133,9 +133,7 @@ static void palmte_button_event(void *opaque, int keycode) */ #define TYPE_PALM_MISC_GPIO "palm-misc-gpio" -typedef struct PalmMiscGPIOState PalmMiscGPIOState; -DECLARE_INSTANCE_CHECKER(PalmMiscGPIOState, PALM_MISC_GPIO, - TYPE_PALM_MISC_GPIO) +OBJECT_DECLARE_SIMPLE_TYPE(PalmMiscGPIOState, PALM_MISC_GPIO) struct PalmMiscGPIOState { SysBusDevice parent_obj; diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 33074dbf82..591776ba88 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -470,9 +470,7 @@ static const VMStateDescription vmstate_pxa2xx_mm = { }; #define TYPE_PXA2XX_SSP "pxa2xx-ssp" -typedef struct PXA2xxSSPState PXA2xxSSPState; -DECLARE_INSTANCE_CHECKER(PXA2xxSSPState, PXA2XX_SSP, - TYPE_PXA2XX_SSP) +OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxSSPState, PXA2XX_SSP) /* Synchronous Serial Ports */ struct PXA2xxSSPState { @@ -811,9 +809,7 @@ static void pxa2xx_ssp_init(Object *obj) #define PIAR 0x38 /* RTC Periodic Interrupt Alarm register */ #define TYPE_PXA2XX_RTC "pxa2xx_rtc" -typedef struct PXA2xxRTCState PXA2xxRTCState; -DECLARE_INSTANCE_CHECKER(PXA2xxRTCState, PXA2XX_RTC, - TYPE_PXA2XX_RTC) +OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxRTCState, PXA2XX_RTC) struct PXA2xxRTCState { /*< private >*/ @@ -1245,9 +1241,7 @@ static const TypeInfo pxa2xx_rtc_sysbus_info = { /* I2C Interface */ #define TYPE_PXA2XX_I2C_SLAVE "pxa2xx-i2c-slave" -typedef struct PXA2xxI2CSlaveState PXA2xxI2CSlaveState; -DECLARE_INSTANCE_CHECKER(PXA2xxI2CSlaveState, PXA2XX_I2C_SLAVE, - TYPE_PXA2XX_I2C_SLAVE) +OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxI2CSlaveState, PXA2XX_I2C_SLAVE) struct PXA2xxI2CSlaveState { I2CSlave parent_obj; diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_gpio.c index 16bbe4fb70..e7c3d99224 100644 --- a/hw/arm/pxa2xx_gpio.c +++ b/hw/arm/pxa2xx_gpio.c @@ -22,9 +22,7 @@ #define PXA2XX_GPIO_BANKS 4 #define TYPE_PXA2XX_GPIO "pxa2xx-gpio" -typedef struct PXA2xxGPIOInfo PXA2xxGPIOInfo; -DECLARE_INSTANCE_CHECKER(PXA2xxGPIOInfo, PXA2XX_GPIO, - TYPE_PXA2XX_GPIO) +OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxGPIOInfo, PXA2XX_GPIO) struct PXA2xxGPIOInfo { /*< private >*/ diff --git a/hw/arm/pxa2xx_pic.c b/hw/arm/pxa2xx_pic.c index cb52a9dff3..cf6cb2a373 100644 --- a/hw/arm/pxa2xx_pic.c +++ b/hw/arm/pxa2xx_pic.c @@ -38,9 +38,7 @@ #define PXA2XX_PIC_SRCS 40 #define TYPE_PXA2XX_PIC "pxa2xx_pic" -typedef struct PXA2xxPICState PXA2xxPICState; -DECLARE_INSTANCE_CHECKER(PXA2xxPICState, PXA2XX_PIC, - TYPE_PXA2XX_PIC) +OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxPICState, PXA2XX_PIC) struct PXA2xxPICState { /*< private >*/ diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index ac68b4640d..bcb2cb4761 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -95,11 +95,9 @@ struct SBSAMachineState { DeviceState *gic; PFlashCFI01 *flash[2]; }; -typedef struct SBSAMachineState SBSAMachineState; #define TYPE_SBSA_MACHINE MACHINE_TYPE_NAME("sbsa-ref") -DECLARE_INSTANCE_CHECKER(SBSAMachineState, SBSA_MACHINE, - TYPE_SBSA_MACHINE) +OBJECT_DECLARE_SIMPLE_TYPE(SBSAMachineState, SBSA_MACHINE) static const MemMapEntry sbsa_ref_memmap[] = { /* 512M boot ROM */ diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index b5b867e6ed..32bdeacfd3 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -81,9 +81,7 @@ OBJECT_DECLARE_TYPE(SpitzMachineState, SpitzMachineClass, SPITZ_MACHINE) #define FLASHCTL_NCE (FLASHCTL_CE0 | FLASHCTL_CE1) #define TYPE_SL_NAND "sl-nand" -typedef struct SLNANDState SLNANDState; -DECLARE_INSTANCE_CHECKER(SLNANDState, SL_NAND, - TYPE_SL_NAND) +OBJECT_DECLARE_SIMPLE_TYPE(SLNANDState, SL_NAND) struct SLNANDState { SysBusDevice parent_obj; @@ -259,9 +257,7 @@ static const int spitz_gpiomap[5] = { }; #define TYPE_SPITZ_KEYBOARD "spitz-keyboard" -typedef struct SpitzKeyboardState SpitzKeyboardState; -DECLARE_INSTANCE_CHECKER(SpitzKeyboardState, SPITZ_KEYBOARD, - TYPE_SPITZ_KEYBOARD) +OBJECT_DECLARE_SIMPLE_TYPE(SpitzKeyboardState, SPITZ_KEYBOARD) struct SpitzKeyboardState { SysBusDevice parent_obj; @@ -579,9 +575,7 @@ static void spitz_keyboard_realize(DeviceState *dev, Error **errp) #define LCDTG_POLCTRL 0x07 #define TYPE_SPITZ_LCDTG "spitz-lcdtg" -typedef struct SpitzLCDTG SpitzLCDTG; -DECLARE_INSTANCE_CHECKER(SpitzLCDTG, SPITZ_LCDTG, - TYPE_SPITZ_LCDTG) +OBJECT_DECLARE_SIMPLE_TYPE(SpitzLCDTG, SPITZ_LCDTG) struct SpitzLCDTG { SSISlave ssidev; @@ -669,9 +663,7 @@ static void spitz_lcdtg_realize(SSISlave *ssi, Error **errp) #define SPITZ_GPIO_TP_INT 11 #define TYPE_CORGI_SSP "corgi-ssp" -typedef struct CorgiSSPState CorgiSSPState; -DECLARE_INSTANCE_CHECKER(CorgiSSPState, CORGI_SSP, - TYPE_CORGI_SSP) +OBJECT_DECLARE_SIMPLE_TYPE(CorgiSSPState, CORGI_SSP) /* "Demux" the signal based on current chipselect */ struct CorgiSSPState { @@ -822,9 +814,7 @@ static void spitz_akita_i2c_setup(PXA2xxState *cpu) * + named GPIO output "adc-temp": the ADC value, to be wired up to the max111x */ #define TYPE_SPITZ_MISC_GPIO "spitz-misc-gpio" -typedef struct SpitzMiscGPIOState SpitzMiscGPIOState; -DECLARE_INSTANCE_CHECKER(SpitzMiscGPIOState, SPITZ_MISC_GPIO, - TYPE_SPITZ_MISC_GPIO) +OBJECT_DECLARE_SIMPLE_TYPE(SpitzMiscGPIOState, SPITZ_MISC_GPIO) struct SpitzMiscGPIOState { SysBusDevice parent_obj; diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index d6fc4a4681..1237f5af02 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -58,9 +58,7 @@ typedef const struct { /* General purpose timer module. */ #define TYPE_STELLARIS_GPTM "stellaris-gptm" -typedef struct gptm_state gptm_state; -DECLARE_INSTANCE_CHECKER(gptm_state, STELLARIS_GPTM, - TYPE_STELLARIS_GPTM) +OBJECT_DECLARE_SIMPLE_TYPE(gptm_state, STELLARIS_GPTM) struct gptm_state { SysBusDevice parent_obj; @@ -721,9 +719,7 @@ static int stellaris_sys_init(uint32_t base, qemu_irq irq, /* I2C controller. */ #define TYPE_STELLARIS_I2C "stellaris-i2c" -typedef struct stellaris_i2c_state stellaris_i2c_state; -DECLARE_INSTANCE_CHECKER(stellaris_i2c_state, STELLARIS_I2C, - TYPE_STELLARIS_I2C) +OBJECT_DECLARE_SIMPLE_TYPE(stellaris_i2c_state, STELLARIS_I2C) struct stellaris_i2c_state { SysBusDevice parent_obj; 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; diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c index 2ef6c7b288..c196f0d2f8 100644 --- a/hw/arm/tosa.c +++ b/hw/arm/tosa.c @@ -75,9 +75,7 @@ static void tosa_microdrive_attach(PXA2xxState *cpu) */ #define TYPE_TOSA_MISC_GPIO "tosa-misc-gpio" -typedef struct TosaMiscGPIOState TosaMiscGPIOState; -DECLARE_INSTANCE_CHECKER(TosaMiscGPIOState, TOSA_MISC_GPIO, - TYPE_TOSA_MISC_GPIO) +OBJECT_DECLARE_SIMPLE_TYPE(TosaMiscGPIOState, TOSA_MISC_GPIO) struct TosaMiscGPIOState { SysBusDevice parent_obj; @@ -172,9 +170,7 @@ static void tosa_ssp_realize(SSISlave *dev, Error **errp) } #define TYPE_TOSA_DAC "tosa_dac" -typedef struct TosaDACState TosaDACState; -DECLARE_INSTANCE_CHECKER(TosaDACState, TOSA_DAC, - TYPE_TOSA_DAC) +OBJECT_DECLARE_SIMPLE_TYPE(TosaDACState, TOSA_DAC) struct TosaDACState { I2CSlave parent_obj; diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index 2ba69f24b7..84d4677abb 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -35,9 +35,7 @@ /* Primary interrupt controller. */ #define TYPE_VERSATILE_PB_SIC "versatilepb_sic" -typedef struct vpb_sic_state vpb_sic_state; -DECLARE_INSTANCE_CHECKER(vpb_sic_state, VERSATILE_PB_SIC, - TYPE_VERSATILE_PB_SIC) +OBJECT_DECLARE_SIMPLE_TYPE(vpb_sic_state, VERSATILE_PB_SIC) struct vpb_sic_state { SysBusDevice parent_obj; diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index f45e71e89b..2c0bff4fa6 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -40,9 +40,7 @@ #include "qom/object.h" #define TYPE_ZYNQ_MACHINE MACHINE_TYPE_NAME("xilinx-zynq-a9") -typedef struct ZynqMachineState ZynqMachineState; -DECLARE_INSTANCE_CHECKER(ZynqMachineState, ZYNQ_MACHINE, - TYPE_ZYNQ_MACHINE) +OBJECT_DECLARE_SIMPLE_TYPE(ZynqMachineState, ZYNQ_MACHINE) /* board base frequency: 33.333333 MHz */ #define PS_CLK_FREQUENCY (100 * 1000 * 1000 / 3) diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c index 1f9409eb32..03e23201b1 100644 --- a/hw/arm/xlnx-versal-virt.c +++ b/hw/arm/xlnx-versal-virt.c @@ -25,9 +25,7 @@ #include "qom/object.h" #define TYPE_XLNX_VERSAL_VIRT_MACHINE MACHINE_TYPE_NAME("xlnx-versal-virt") -typedef struct VersalVirt VersalVirt; -DECLARE_INSTANCE_CHECKER(VersalVirt, XLNX_VERSAL_VIRT_MACHINE, - TYPE_XLNX_VERSAL_VIRT_MACHINE) +OBJECT_DECLARE_SIMPLE_TYPE(VersalVirt, XLNX_VERSAL_VIRT_MACHINE) struct VersalVirt { MachineState parent_obj; diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c index 19d5a4d4e0..066571a972 100644 --- a/hw/arm/xlnx-zcu102.c +++ b/hw/arm/xlnx-zcu102.c @@ -36,11 +36,9 @@ struct XlnxZCU102 { struct arm_boot_info binfo; }; -typedef struct XlnxZCU102 XlnxZCU102; #define TYPE_ZCU102_MACHINE MACHINE_TYPE_NAME("xlnx-zcu102") -DECLARE_INSTANCE_CHECKER(XlnxZCU102, ZCU102_MACHINE, - TYPE_ZCU102_MACHINE) +OBJECT_DECLARE_SIMPLE_TYPE(XlnxZCU102, ZCU102_MACHINE) static bool zcu102_get_secure(Object *obj, Error **errp) diff --git a/hw/arm/z2.c b/hw/arm/z2.c index 72ecb6df29..4fc5699dae 100644 --- a/hw/arm/z2.c +++ b/hw/arm/z2.c @@ -111,11 +111,9 @@ struct ZipitLCD { uint32_t cur_reg; int pos; }; -typedef struct ZipitLCD ZipitLCD; #define TYPE_ZIPIT_LCD "zipit-lcd" -DECLARE_INSTANCE_CHECKER(ZipitLCD, ZIPIT_LCD, - TYPE_ZIPIT_LCD) +OBJECT_DECLARE_SIMPLE_TYPE(ZipitLCD, ZIPIT_LCD) static uint32_t zipit_lcd_transfer(SSISlave *dev, uint32_t value) { @@ -198,9 +196,7 @@ static const TypeInfo zipit_lcd_info = { }; #define TYPE_AER915 "aer915" -typedef struct AER915State AER915State; -DECLARE_INSTANCE_CHECKER(AER915State, AER915, - TYPE_AER915) +OBJECT_DECLARE_SIMPLE_TYPE(AER915State, AER915) struct AER915State { I2CSlave parent_obj; |