aboutsummaryrefslogtreecommitdiff
path: root/hw/gpio
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-09-16 14:25:19 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-18 14:12:32 -0400
commit8063396bf3459a810d24e3efd6110b8480f0de5b (patch)
tree40f85f15d7016e3ee66916a59be53d2b2c71510a /hw/gpio
parenta489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (diff)
downloadqemu-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/gpio')
-rw-r--r--hw/gpio/gpio_key.c4
-rw-r--r--hw/gpio/max7310.c4
-rw-r--r--hw/gpio/mpc8xxx.c4
-rw-r--r--hw/gpio/pl061.c4
-rw-r--r--hw/gpio/puv3_gpio.c4
-rw-r--r--hw/gpio/zaurus.c4
6 files changed, 6 insertions, 18 deletions
diff --git a/hw/gpio/gpio_key.c b/hw/gpio/gpio_key.c
index 86aa78a..74f6138 100644
--- a/hw/gpio/gpio_key.c
+++ b/hw/gpio/gpio_key.c
@@ -31,9 +31,7 @@
#include "qom/object.h"
#define TYPE_GPIOKEY "gpio-key"
-typedef struct GPIOKEYState GPIOKEYState;
-DECLARE_INSTANCE_CHECKER(GPIOKEYState, GPIOKEY,
- TYPE_GPIOKEY)
+OBJECT_DECLARE_SIMPLE_TYPE(GPIOKEYState, GPIOKEY)
#define GPIO_KEY_LATENCY 100 /* 100ms */
struct GPIOKEYState {
diff --git a/hw/gpio/max7310.c b/hw/gpio/max7310.c
index 2888d07..256d833 100644
--- a/hw/gpio/max7310.c
+++ b/hw/gpio/max7310.c
@@ -18,9 +18,7 @@
#include "qom/object.h"
#define TYPE_MAX7310 "max7310"
-typedef struct MAX7310State MAX7310State;
-DECLARE_INSTANCE_CHECKER(MAX7310State, MAX7310,
- TYPE_MAX7310)
+OBJECT_DECLARE_SIMPLE_TYPE(MAX7310State, MAX7310)
struct MAX7310State {
I2CSlave parent_obj;
diff --git a/hw/gpio/mpc8xxx.c b/hw/gpio/mpc8xxx.c
index dac8b1b..e60c919 100644
--- a/hw/gpio/mpc8xxx.c
+++ b/hw/gpio/mpc8xxx.c
@@ -27,9 +27,7 @@
#include "qom/object.h"
#define TYPE_MPC8XXX_GPIO "mpc8xxx_gpio"
-typedef struct MPC8XXXGPIOState MPC8XXXGPIOState;
-DECLARE_INSTANCE_CHECKER(MPC8XXXGPIOState, MPC8XXX_GPIO,
- TYPE_MPC8XXX_GPIO)
+OBJECT_DECLARE_SIMPLE_TYPE(MPC8XXXGPIOState, MPC8XXX_GPIO)
struct MPC8XXXGPIOState {
SysBusDevice parent_obj;
diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c
index 3420df0..e72e775 100644
--- a/hw/gpio/pl061.c
+++ b/hw/gpio/pl061.c
@@ -35,9 +35,7 @@ static const uint8_t pl061_id_luminary[12] =
{ 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x18, 0x01, 0x0d, 0xf0, 0x05, 0xb1 };
#define TYPE_PL061 "pl061"
-typedef struct PL061State PL061State;
-DECLARE_INSTANCE_CHECKER(PL061State, PL061,
- TYPE_PL061)
+OBJECT_DECLARE_SIMPLE_TYPE(PL061State, PL061)
#define N_GPIOS 8
diff --git a/hw/gpio/puv3_gpio.c b/hw/gpio/puv3_gpio.c
index 98ea2b4..e003ae5 100644
--- a/hw/gpio/puv3_gpio.c
+++ b/hw/gpio/puv3_gpio.c
@@ -19,9 +19,7 @@
#include "qemu/log.h"
#define TYPE_PUV3_GPIO "puv3_gpio"
-typedef struct PUV3GPIOState PUV3GPIOState;
-DECLARE_INSTANCE_CHECKER(PUV3GPIOState, PUV3_GPIO,
- TYPE_PUV3_GPIO)
+OBJECT_DECLARE_SIMPLE_TYPE(PUV3GPIOState, PUV3_GPIO)
struct PUV3GPIOState {
SysBusDevice parent_obj;
diff --git a/hw/gpio/zaurus.c b/hw/gpio/zaurus.c
index 3d25c55..7cf52a5 100644
--- a/hw/gpio/zaurus.c
+++ b/hw/gpio/zaurus.c
@@ -28,9 +28,7 @@
/* SCOOP devices */
#define TYPE_SCOOP "scoop"
-typedef struct ScoopInfo ScoopInfo;
-DECLARE_INSTANCE_CHECKER(ScoopInfo, SCOOP,
- TYPE_SCOOP)
+OBJECT_DECLARE_SIMPLE_TYPE(ScoopInfo, SCOOP)
struct ScoopInfo {
SysBusDevice parent_obj;