@@ -260,7 +260,7 @@ static void xics_common_class_init(ObjectClass *oc, void *data)
static const TypeInfo xics_common_info = {
.name = TYPE_XICS_COMMON,
- .parent = TYPE_SYS_BUS_DEVICE,
+ .parent = TYPE_DEVICE,
.instance_size = sizeof(XICSState),
.class_size = sizeof(XICSStateClass),
.instance_init = xics_common_initfn,
@@ -101,7 +101,7 @@ static XICSState *try_create_xics(const char *type, int nr_servers,
Error *err = NULL;
DeviceState *dev;
- dev = qdev_create(NULL, type);
+ dev = DEVICE(object_new(type));
qdev_prop_set_uint32(dev, "nr_servers", nr_servers);
qdev_prop_set_uint32(dev, "nr_irqs", nr_irqs);
object_property_set_bool(OBJECT(dev), true, "realized", &err);