aboutsummaryrefslogtreecommitdiff
path: root/hw/gpio
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-31 17:07:33 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-09 09:27:09 -0400
commit8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch)
tree6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /hw/gpio
parentdb1015e92e04835c9eb50c29625fe566d1202dbd (diff)
downloadqemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.zip
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.gz
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.bz2
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 2500a23..86aa78a 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 dd7e7f2..5511047 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 b33462e..dac8b1b 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 6c36407..3420df0 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 5e0ee78..98ea2b4 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 048e40c..3d25c55 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;