summaryrefslogtreecommitdiffstats
path: root/include/hw/gpio
diff options
context:
space:
mode:
authorEduardo Habkost2020-09-16 20:25:19 +0200
committerEduardo Habkost2020-09-18 20:12:32 +0200
commit8063396bf3459a810d24e3efd6110b8480f0de5b (patch)
tree40f85f15d7016e3ee66916a59be53d2b2c71510a /include/hw/gpio
parentUse OBJECT_DECLARE_TYPE when possible (diff)
downloadqemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.gz
qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.xz
qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.zip
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/gpio')
-rw-r--r--include/hw/gpio/bcm2835_gpio.h4
-rw-r--r--include/hw/gpio/imx_gpio.h4
-rw-r--r--include/hw/gpio/nrf51_gpio.h4
3 files changed, 3 insertions, 9 deletions
diff --git a/include/hw/gpio/bcm2835_gpio.h b/include/hw/gpio/bcm2835_gpio.h
index e06e08a0fe..1c53a05090 100644
--- a/include/hw/gpio/bcm2835_gpio.h
+++ b/include/hw/gpio/bcm2835_gpio.h
@@ -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
diff --git a/include/hw/gpio/imx_gpio.h b/include/hw/gpio/imx_gpio.h
index a72b272ace..227860b9f0 100644
--- a/include/hw/gpio/imx_gpio.h
+++ b/include/hw/gpio/imx_gpio.h
@@ -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
diff --git a/include/hw/gpio/nrf51_gpio.h b/include/hw/gpio/nrf51_gpio.h
index 55d7d24a52..8f9c2f86da 100644
--- a/include/hw/gpio/nrf51_gpio.h
+++ b/include/hw/gpio/nrf51_gpio.h
@@ -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