mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
Access BusState::allow_hotplug using wraper qbus_is_hotpluggable()
It would allow to transparently switch detection whether Bus is hotpluggable from allow_hotplug field to hotplug_handler link and to drop allow_hotplug field once all users are converted to hotplug handler API. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
49cec38591
commit
39b888bd88
5 changed files with 12 additions and 7 deletions
|
@ -774,7 +774,7 @@ static void *acpi_set_bsel(PCIBus *bus, void *opaque)
|
|||
unsigned *bsel_alloc = opaque;
|
||||
unsigned *bus_bsel;
|
||||
|
||||
if (bus->qbus.allow_hotplug) {
|
||||
if (qbus_is_hotpluggable(BUS(bus))) {
|
||||
bus_bsel = g_malloc(sizeof *bus_bsel);
|
||||
|
||||
*bus_bsel = (*bsel_alloc)++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue