diff options
Diffstat (limited to 'hw/qdev.c')
-rw-r--r-- | hw/qdev.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -314,9 +314,17 @@ BusState *sysbus_get_default(void) return main_system_bus; } +static int qbus_reset_one(BusState *bus, void *opaque) +{ + if (bus->info->reset) { + return bus->info->reset(bus); + } + return 0; +} + void qbus_reset_all(BusState *bus) { - qbus_walk_children(bus, qdev_reset_one, NULL, NULL); + qbus_walk_children(bus, qdev_reset_one, qbus_reset_one, NULL); } /* can be used as ->unplug() callback for the simple cases */ |