mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
make sure that we aren't overwriting mc->get_hotplug_handler by accident
Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 1525691524-32265-5-git-send-email-imammedo@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
3b77f6c353
commit
debbdc0018
5 changed files with 5 additions and 0 deletions
|
@ -74,6 +74,7 @@ static void e500plat_machine_class_init(ObjectClass *oc, void *data)
|
|||
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
|
||||
MachineClass *mc = MACHINE_CLASS(oc);
|
||||
|
||||
assert(!mc->get_hotplug_handler);
|
||||
mc->get_hotplug_handler = e500plat_machine_get_hotpug_handler;
|
||||
hc->plug = e500plat_machine_device_plug_cb;
|
||||
|
||||
|
|
|
@ -3980,6 +3980,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
|
|||
mc->kvm_type = spapr_kvm_type;
|
||||
machine_class_allow_dynamic_sysbus_dev(mc, TYPE_SPAPR_PCI_HOST_BRIDGE);
|
||||
mc->pci_allow_0_address = true;
|
||||
assert(!mc->get_hotplug_handler);
|
||||
mc->get_hotplug_handler = spapr_get_hotplug_handler;
|
||||
hc->pre_plug = spapr_machine_device_pre_plug;
|
||||
hc->plug = spapr_machine_device_plug;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue