diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-08-31 17:07:33 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-09 09:27:09 -0400 |
commit | 8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch) | |
tree | 6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /include/hw/i2c/i2c.h | |
parent | db1015e92e04835c9eb50c29625fe566d1202dbd (diff) | |
download | 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 'include/hw/i2c/i2c.h')
-rw-r--r-- | include/hw/i2c/i2c.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h index a22f861451..2074f7c971 100644 --- a/include/hw/i2c/i2c.h +++ b/include/hw/i2c/i2c.h @@ -20,12 +20,8 @@ typedef struct I2CSlave I2CSlave; #define TYPE_I2C_SLAVE "i2c-slave" typedef struct I2CSlaveClass I2CSlaveClass; -#define I2C_SLAVE(obj) \ - OBJECT_CHECK(I2CSlave, (obj), TYPE_I2C_SLAVE) -#define I2C_SLAVE_CLASS(klass) \ - OBJECT_CLASS_CHECK(I2CSlaveClass, (klass), TYPE_I2C_SLAVE) -#define I2C_SLAVE_GET_CLASS(obj) \ - OBJECT_GET_CLASS(I2CSlaveClass, (obj), TYPE_I2C_SLAVE) +DECLARE_OBJ_CHECKERS(I2CSlave, I2CSlaveClass, + I2C_SLAVE, TYPE_I2C_SLAVE) struct I2CSlaveClass { DeviceClass parent_class; @@ -55,7 +51,8 @@ struct I2CSlave { }; #define TYPE_I2C_BUS "i2c-bus" -#define I2C_BUS(obj) OBJECT_CHECK(I2CBus, (obj), TYPE_I2C_BUS) +DECLARE_INSTANCE_CHECKER(I2CBus, I2C_BUS, + TYPE_I2C_BUS) typedef struct I2CNode I2CNode; |