summaryrefslogtreecommitdiffstats
path: root/hw/gpio
diff options
context:
space:
mode:
authorEduardo Habkost2020-08-31 23:07:33 +0200
committerEduardo Habkost2020-09-09 15:27:09 +0200
commit8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch)
tree6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /hw/gpio
parentMove QOM typedefs and add missing includes (diff)
downloadqemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.gz
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.xz
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.zip
Use DECLARE_*CHECKER* macros
Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-12-ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-13-ehabkost@redhat.com> Message-Id: <20200831210740.126168-14-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/gpio')
-rw-r--r--hw/gpio/gpio_key.c3
-rw-r--r--hw/gpio/max7310.c3
-rw-r--r--hw/gpio/mpc8xxx.c3
-rw-r--r--hw/gpio/pl061.c3
-rw-r--r--hw/gpio/puv3_gpio.c3
-rw-r--r--hw/gpio/zaurus.c3
6 files changed, 12 insertions, 6 deletions
diff --git a/hw/gpio/gpio_key.c b/hw/gpio/gpio_key.c
index 2500a23c6e..86aa78aae4 100644
--- a/hw/gpio/gpio_key.c
+++ b/hw/gpio/gpio_key.c
@@ -32,7 +32,8 @@
#define TYPE_GPIOKEY "gpio-key"
typedef struct GPIOKEYState GPIOKEYState;
-#define GPIOKEY(obj) OBJECT_CHECK(GPIOKEYState, (obj), TYPE_GPIOKEY)
+DECLARE_INSTANCE_CHECKER(GPIOKEYState, GPIOKEY,
+ TYPE_GPIOKEY)
#define GPIO_KEY_LATENCY 100 /* 100ms */
struct GPIOKEYState {
diff --git a/hw/gpio/max7310.c b/hw/gpio/max7310.c
index dd7e7f293d..5511047f35 100644
--- a/hw/gpio/max7310.c
+++ b/hw/gpio/max7310.c
@@ -18,7 +18,8 @@
#define TYPE_MAX7310 "max7310"
typedef struct MAX7310State MAX7310State;
-#define MAX7310(obj) OBJECT_CHECK(MAX7310State, (obj), TYPE_MAX7310)
+DECLARE_INSTANCE_CHECKER(MAX7310State, MAX7310,
+ TYPE_MAX7310)
struct MAX7310State {
I2CSlave parent_obj;
diff --git a/hw/gpio/mpc8xxx.c b/hw/gpio/mpc8xxx.c
index b33462e4db..dac8b1be38 100644
--- a/hw/gpio/mpc8xxx.c
+++ b/hw/gpio/mpc8xxx.c
@@ -28,7 +28,8 @@
#define TYPE_MPC8XXX_GPIO "mpc8xxx_gpio"
typedef struct MPC8XXXGPIOState MPC8XXXGPIOState;
-#define MPC8XXX_GPIO(obj) OBJECT_CHECK(MPC8XXXGPIOState, (obj), TYPE_MPC8XXX_GPIO)
+DECLARE_INSTANCE_CHECKER(MPC8XXXGPIOState, MPC8XXX_GPIO,
+ TYPE_MPC8XXX_GPIO)
struct MPC8XXXGPIOState {
SysBusDevice parent_obj;
diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c
index 6c36407079..3420df0d1f 100644
--- a/hw/gpio/pl061.c
+++ b/hw/gpio/pl061.c
@@ -36,7 +36,8 @@ static const uint8_t pl061_id_luminary[12] =
#define TYPE_PL061 "pl061"
typedef struct PL061State PL061State;
-#define PL061(obj) OBJECT_CHECK(PL061State, (obj), TYPE_PL061)
+DECLARE_INSTANCE_CHECKER(PL061State, PL061,
+ TYPE_PL061)
#define N_GPIOS 8
diff --git a/hw/gpio/puv3_gpio.c b/hw/gpio/puv3_gpio.c
index 5e0ee783dc..98ea2b4c2e 100644
--- a/hw/gpio/puv3_gpio.c
+++ b/hw/gpio/puv3_gpio.c
@@ -20,7 +20,8 @@
#define TYPE_PUV3_GPIO "puv3_gpio"
typedef struct PUV3GPIOState PUV3GPIOState;
-#define PUV3_GPIO(obj) OBJECT_CHECK(PUV3GPIOState, (obj), TYPE_PUV3_GPIO)
+DECLARE_INSTANCE_CHECKER(PUV3GPIOState, PUV3_GPIO,
+ TYPE_PUV3_GPIO)
struct PUV3GPIOState {
SysBusDevice parent_obj;
diff --git a/hw/gpio/zaurus.c b/hw/gpio/zaurus.c
index 048e40c072..3d25c55d06 100644
--- a/hw/gpio/zaurus.c
+++ b/hw/gpio/zaurus.c
@@ -29,7 +29,8 @@
#define TYPE_SCOOP "scoop"
typedef struct ScoopInfo ScoopInfo;
-#define SCOOP(obj) OBJECT_CHECK(ScoopInfo, (obj), TYPE_SCOOP)
+DECLARE_INSTANCE_CHECKER(ScoopInfo, SCOOP,
+ TYPE_SCOOP)
struct ScoopInfo {
SysBusDevice parent_obj;