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>
This commit is contained in:
Eduardo Habkost 2020-09-16 14:25:19 -04:00
parent a489d1951c
commit 8063396bf3
505 changed files with 609 additions and 1795 deletions

View file

@ -33,10 +33,8 @@ struct BCM2835GpioState {
uint8_t sd_fsel;
qemu_irq out[54];
};
typedef struct BCM2835GpioState BCM2835GpioState;
#define TYPE_BCM2835_GPIO "bcm2835_gpio"
DECLARE_INSTANCE_CHECKER(BCM2835GpioState, BCM2835_GPIO,
TYPE_BCM2835_GPIO)
OBJECT_DECLARE_SIMPLE_TYPE(BCM2835GpioState, BCM2835_GPIO)
#endif

View file

@ -24,9 +24,7 @@
#include "qom/object.h"
#define TYPE_IMX_GPIO "imx.gpio"
typedef struct IMXGPIOState IMXGPIOState;
DECLARE_INSTANCE_CHECKER(IMXGPIOState, IMX_GPIO,
TYPE_IMX_GPIO)
OBJECT_DECLARE_SIMPLE_TYPE(IMXGPIOState, IMX_GPIO)
#define IMX_GPIO_MEM_SIZE 0x20

View file

@ -29,9 +29,7 @@
#include "hw/sysbus.h"
#include "qom/object.h"
#define TYPE_NRF51_GPIO "nrf51_soc.gpio"
typedef struct NRF51GPIOState NRF51GPIOState;
DECLARE_INSTANCE_CHECKER(NRF51GPIOState, NRF51_GPIO,
TYPE_NRF51_GPIO)
OBJECT_DECLARE_SIMPLE_TYPE(NRF51GPIOState, NRF51_GPIO)
#define NRF51_GPIO_PINS 32