void qdev_set_parent_bus(DeviceState *dev, BusState *bus)

{

    Property *prop;



    if (qdev_hotplug) {

        assert(bus->allow_hotplug);

    }



    dev->parent_bus = bus;

    QTAILQ_INSERT_HEAD(&bus->children, dev, sibling);



    qdev_prop_set_defaults(dev, dev->parent_bus->info->props);

    for (prop = qdev_get_bus_info(dev)->props; prop && prop->name; prop++) {

        qdev_property_add_legacy(dev, prop, NULL);

        qdev_property_add_static(dev, prop, NULL);

    }

}

void qdev_set_parent_bus(DeviceState *dev, BusState *bus)

{

    Property *prop;



    if (qdev_hotplug) {

        assert(bus->allow_hotplug);

    }



    dev->parent_bus = bus;

    QTAILQ_INSERT_HEAD(&bus->children, dev, sibling);



    qdev_prop_set_defaults(dev, dev->parent_bus->info->props);

    for (prop = qdev_get_bus_info(dev)->props; prop && prop->name; prop++) {

        qdev_property_add_legacy(dev, prop, NULL);

        qdev_property_add_static(dev, prop, NULL);

    }

}

void FUNC_0(DeviceState *VAR_0, BusState *VAR_1)

{

    Property *prop;



    if (qdev_hotplug) {

        assert(VAR_1->allow_hotplug);

    }



    VAR_0->parent_bus = VAR_1;

    QTAILQ_INSERT_HEAD(&VAR_1->children, VAR_0, sibling);



    qdev_prop_set_defaults(VAR_0, VAR_0->parent_bus->info->props);

    for (prop = qdev_get_bus_info(VAR_0)->props; prop && prop->name; prop++) {

        qdev_property_add_legacy(VAR_0, prop, NULL);

        qdev_property_add_static(VAR_0, prop, NULL);

    }

}

void FUNC_0(DeviceState *VAR_0, BusState *VAR_1)
{ Property *prop; if (qdev_hotplug) { assert(VAR_1->allow_hotplug); } VAR_0->parent_bus = VAR_1; QTAILQ_INSERT_HEAD(&VAR_1->children, VAR_0, sibling); qdev_prop_set_defaults(VAR_0, VAR_0->parent_bus->info->props); for (prop = qdev_get_bus_info(VAR_0)->props; prop && prop->name; prop++) { qdev_property_add_legacy(VAR_0, prop, NULL); qdev_property_add_static(VAR_0, prop, NULL); } }