Revision b4694b7c hw/qdev.c

b/hw/qdev.c
314 314
    return main_system_bus;
315 315
}
316 316

  
317
static int qbus_reset_one(BusState *bus, void *opaque)
318
{
319
    if (bus->info->reset) {
320
        return bus->info->reset(bus);
321
    }
322
    return 0;
323
}
324

  
317 325
void qbus_reset_all(BusState *bus)
318 326
{
319
    qbus_walk_children(bus, qdev_reset_one, NULL, NULL);
327
    qbus_walk_children(bus, qdev_reset_one, qbus_reset_one, NULL);
320 328
}
321 329

  
322 330
/* can be used as ->unplug() callback for the simple cases */

Also available in: Unified diff