Hi
On 12/19/2015 02:01 AM, Paolo Bonzini wrote:
On 18/12/2015 12:03, Cao jin wrote:
[...]
+
+err_register_bus:
+ object_unref(OBJECT(ds));
+ object_unref(OBJECT(bds));
+ object_unref(OBJECT(bus));
I think these should be object_unparent, not unref.
But, it seems these 3 objects isn`t added as a child-property via
object_property_add_child() during creation, so OBJECT(ds)->parent(so
does the other 2) will be NULL, and so object_unparent will do nothing?
Or am I missing something?
Paolo
}
static void pxb_dev_exitfn(PCIDevice *pci_dev)
@@ -259,7 +263,7 @@ static void pxb_dev_class_init(ObjectClass *klass, void
*data)
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
- k->init = pxb_dev_initfn;
+ k->realize = pxb_dev_realize;
k->exit = pxb_dev_exitfn;
k->vendor_id = PCI_VENDOR_ID_REDHAT;
k->device_id = PCI_DEVICE_ID_REDHAT_PXB;
.
--
Yours Sincerely,
Cao Jin