mirror of https://github.com/xemu-project/xemu.git
hw/i2c/mpc_i2c: Prefer DEFINE_TYPES() macro
Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Acked-by: Corey Minyard <cminyard@mvista.com> Message-ID: <20241103133412.73536-13-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
1d97f16edb
commit
21b1ee7691
|
@ -20,7 +20,6 @@
|
|||
#include "qemu/osdep.h"
|
||||
#include "hw/i2c/i2c.h"
|
||||
#include "hw/irq.h"
|
||||
#include "qemu/module.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qom/object.h"
|
||||
|
@ -345,16 +344,13 @@ static void mpc_i2c_class_init(ObjectClass *klass, void *data)
|
|||
dc->desc = "MPC I2C Controller";
|
||||
}
|
||||
|
||||
static const TypeInfo mpc_i2c_type_info = {
|
||||
.name = TYPE_MPC_I2C,
|
||||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.instance_size = sizeof(MPCI2CState),
|
||||
.class_init = mpc_i2c_class_init,
|
||||
static const TypeInfo mpc_i2c_types[] = {
|
||||
{
|
||||
.name = TYPE_MPC_I2C,
|
||||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.instance_size = sizeof(MPCI2CState),
|
||||
.class_init = mpc_i2c_class_init,
|
||||
},
|
||||
};
|
||||
|
||||
static void mpc_i2c_register_types(void)
|
||||
{
|
||||
type_register_static(&mpc_i2c_type_info);
|
||||
}
|
||||
|
||||
type_init(mpc_i2c_register_types)
|
||||
DEFINE_TYPES(mpc_i2c_types)
|
||||
|
|
Loading…
Reference in New Issue