Revision 505597e4 hw/acpi_piix4.c

b/hw/acpi_piix4.c
471 471
    BusState *bus = opaque;
472 472
    DeviceState *qdev, *next;
473 473
    PCIDevice *dev;
474
    PCIDeviceInfo *info;
474 475
    int slot = ffs(val) - 1;
475 476

  
476 477
    QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {
477 478
        dev = DO_UPCAST(PCIDevice, qdev, qdev);
478
        if (PCI_SLOT(dev->devfn) == slot) {
479
        info = container_of(qdev->info, PCIDeviceInfo, qdev);
480
        if (PCI_SLOT(dev->devfn) == slot && !info->no_hotplug) {
479 481
            qdev_free(qdev);
480 482
        }
481 483
    }

Also available in: Unified diff