diff options
-rw-r--r-- | hw/intc/xics.c | 2 | ||||
-rw-r--r-- | hw/ppc/spapr.c | 3 | ||||
-rw-r--r-- | include/hw/ppc/xics.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 095c16a300..372b8311fb 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -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, diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e0bb9bcb85..0c475f45ed 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -101,9 +101,10 @@ 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); + qdev_set_parent_bus(dev, sysbus_get_default()); object_property_set_bool(OBJECT(dev), true, "realized", &err); if (err) { error_propagate(errp, err); diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 3f0c31610a..1aefd3d522 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -80,7 +80,7 @@ struct XICSStateClass { struct XICSState { /*< private >*/ - SysBusDevice parent_obj; + DeviceState parent_obj; /*< public >*/ uint32_t nr_servers; uint32_t nr_irqs; |