summaryrefslogtreecommitdiffstats
path: root/hw/pci-host
diff options
context:
space:
mode:
authorIgor Mammedov2014-02-05 16:36:48 +0100
committerMichael S. Tsirkin2014-02-10 09:26:56 +0100
commit2897ae026758eac78284ba6c3bd7732f3a1d9987 (patch)
tree5bda64525a4099f46ba288800916f041143f5974 /hw/pci-host
parenthw/acpi: move typeinfo to the file end (diff)
downloadqemu-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/pci-host')
-rw-r--r--hw/pci-host/piix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index e89d5c1dfa..ffdc853a62 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -628,7 +628,7 @@ static void piix3_class_init(ObjectClass *klass, void *data)
dc->desc = "ISA bridge";
dc->vmsd = &vmstate_piix3;
- k->no_hotplug = 1;
+ dc->hotpluggable = false;
k->init = piix3_initfn;
k->config_write = piix3_write_config;
k->vendor_id = PCI_VENDOR_ID_INTEL;
@@ -656,7 +656,7 @@ static void piix3_xen_class_init(ObjectClass *klass, void *data)
dc->desc = "ISA bridge";
dc->vmsd = &vmstate_piix3;
- k->no_hotplug = 1;
+ dc->hotpluggable = false;
k->init = piix3_initfn;
k->config_write = piix3_write_config_xen;
k->vendor_id = PCI_VENDOR_ID_INTEL;
@@ -682,7 +682,6 @@ static void i440fx_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
- k->no_hotplug = 1;
k->init = i440fx_initfn;
k->config_write = i440fx_write_config;
k->vendor_id = PCI_VENDOR_ID_INTEL;
@@ -696,6 +695,7 @@ static void i440fx_class_init(ObjectClass *klass, void *data)
* host-facing part, which can't be device_add'ed, yet.
*/
dc->cannot_instantiate_with_device_add_yet = true;
+ dc->hotpluggable = false;
}
static const TypeInfo i440fx_info = {