diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-04-18 17:33:15 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-04-26 13:14:57 -0500 |
commit | 1d38574fdf1d0232e99240c7079537c6ed00e3a4 (patch) | |
tree | b452589159f1d177171623e5e858f163c9c2d44d /hw/pc_sysfw.c | |
parent | ec4a804792ea20f716371a0a661efc9ec15c7ff0 (diff) | |
download | qemu-1d38574fdf1d0232e99240c7079537c6ed00e3a4.zip |
pc-sysfw: make sure to call qdev_init
We're not actually calling qdev_init for the pc-sysfw device. Since we create
the canonical path during realize, this was causing an assert to trigger when
attempting to read a link pointing to pc-sysfw.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pc_sysfw.c')
-rw-r--r-- | hw/pc_sysfw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/pc_sysfw.c b/hw/pc_sysfw.c index abf9004182..fafdf9b1c1 100644 --- a/hw/pc_sysfw.c +++ b/hw/pc_sysfw.c @@ -190,6 +190,8 @@ void pc_system_firmware_init(MemoryRegion *rom_memory) sysfw_dev = (PcSysFwDevice*) qdev_create(NULL, "pc-sysfw"); + qdev_init_nofail(DEVICE(sysfw_dev)); + if (sysfw_dev->rom_only) { old_pc_system_rom_init(rom_memory); return; @@ -230,11 +232,17 @@ static Property pcsysfw_properties[] = { DEFINE_PROP_END_OF_LIST(), }; +static int pcsysfw_init(DeviceState *dev) +{ + return 0; +} + static void pcsysfw_class_init (ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS (klass); dc->desc = "PC System Firmware"; + dc->init = pcsysfw_init; dc->props = pcsysfw_properties; } |