diff options
author | Igor Mammedov | 2014-02-05 16:36:48 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2014-02-10 09:26:56 +0100 |
commit | 2897ae026758eac78284ba6c3bd7732f3a1d9987 (patch) | |
tree | 5bda64525a4099f46ba288800916f041143f5974 /hw/i386/acpi-build.c | |
parent | hw/acpi: move typeinfo to the file end (diff) | |
download | qemu-2897ae026758eac78284ba6c3bd7732f3a1d9987.tar.gz qemu-2897ae026758eac78284ba6c3bd7732f3a1d9987.tar.xz qemu-2897ae026758eac78284ba6c3bd7732f3a1d9987.zip |
qdev:pci: refactor PCIDevice to use generic "hotpluggable" property
Get rid of PCIDevice specific PCIDeviceClass.no_hotplug and use
generic DeviceClass.hotpluggable field instead.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r-- | hw/i386/acpi-build.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 50e83f3b46..b1a7ebb8e3 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -768,6 +768,7 @@ static void build_pci_bus_end(PCIBus *bus, void *bus_state) memset(slot_hotplug_enable, 0xff, sizeof slot_hotplug_enable); for (i = 0; i < ARRAY_SIZE(bus->devices); ++i) { + DeviceClass *dc; PCIDeviceClass *pc; PCIDevice *pdev = bus->devices[i]; @@ -776,8 +777,9 @@ static void build_pci_bus_end(PCIBus *bus, void *bus_state) } pc = PCI_DEVICE_GET_CLASS(pdev); + dc = DEVICE_GET_CLASS(pdev); - if (pc->no_hotplug || pc->is_bridge) { + if (!dc->hotpluggable || pc->is_bridge) { int slot = PCI_SLOT(i); clear_bit(slot, slot_hotplug_enable); |