diff options
author | Igor Mammedov <imammedo@redhat.com> | 2014-02-05 16:36:48 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-02-10 10:26:56 +0200 |
commit | 2897ae026758eac78284ba6c3bd7732f3a1d9987 (patch) | |
tree | 5bda64525a4099f46ba288800916f041143f5974 /hw/acpi/pcihp.c | |
parent | 5fdae20cef2857a2c63c8d4fa7df6274d6d7c3c8 (diff) |
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/acpi/pcihp.c')
-rw-r--r-- | hw/acpi/pcihp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index 1ce6fc2768..3bd5a06a98 100644 --- a/hw/acpi/pcihp.c +++ b/hw/acpi/pcihp.c @@ -105,12 +105,13 @@ static PCIBus *acpi_pcihp_find_hotplug_bus(AcpiPciHpState *s, int bsel) static bool acpi_pcihp_pc_no_hotplug(AcpiPciHpState *s, PCIDevice *dev) { PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev); + DeviceClass *dc = DEVICE_GET_CLASS(dev); /* * ACPI doesn't allow hotplug of bridge devices. Don't allow * hot-unplug of bridge devices unless they were added by hotplug * (and so, not described by acpi). */ - return (pc->is_bridge && !dev->qdev.hotplugged) || pc->no_hotplug; + return (pc->is_bridge && !dev->qdev.hotplugged) || !dc->hotpluggable; } static void acpi_pcihp_eject_slot(AcpiPciHpState *s, unsigned bsel, unsigned slots) |