diff options
Diffstat (limited to 'hw/ds1338.c')
-rw-r--r-- | hw/ds1338.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/ds1338.c b/hw/ds1338.c index 4e09efe123..b137e13379 100644 --- a/hw/ds1338.c +++ b/hw/ds1338.c @@ -128,15 +128,16 @@ static void ds1338_class_init(ObjectClass *klass, void *data) k->send = ds1338_send; } -static DeviceInfo ds1338_info = { - .name = "ds1338", - .size = sizeof(DS1338State), - .class_init = ds1338_class_init, +static TypeInfo ds1338_info = { + .name = "ds1338", + .parent = TYPE_I2C_SLAVE, + .instance_size = sizeof(DS1338State), + .class_init = ds1338_class_init, }; static void ds1338_register_devices(void) { - i2c_register_slave(&ds1338_info); + type_register_static(&ds1338_info); } device_init(ds1338_register_devices) |