mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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>
This commit is contained in:
parent
5fdae20cef
commit
2897ae0267
16 changed files with 21 additions and 30 deletions
|
@ -123,7 +123,7 @@ static void ehci_class_init(ObjectClass *klass, void *data)
|
|||
k->init = usb_ehci_pci_initfn;
|
||||
k->class_id = PCI_CLASS_SERIAL_USB;
|
||||
k->config_write = usb_ehci_pci_write_config;
|
||||
k->no_hotplug = 1;
|
||||
dc->hotpluggable = false;
|
||||
dc->vmsd = &vmstate_ehci_pci;
|
||||
dc->props = ehci_pci_properties;
|
||||
}
|
||||
|
|
|
@ -1993,10 +1993,10 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data)
|
|||
k->vendor_id = PCI_VENDOR_ID_APPLE;
|
||||
k->device_id = PCI_DEVICE_ID_APPLE_IPID_USB;
|
||||
k->class_id = PCI_CLASS_SERIAL_USB;
|
||||
k->no_hotplug = 1;
|
||||
set_bit(DEVICE_CATEGORY_USB, dc->categories);
|
||||
dc->desc = "Apple USB Controller";
|
||||
dc->props = ohci_pci_properties;
|
||||
dc->hotpluggable = false;
|
||||
}
|
||||
|
||||
static const TypeInfo ohci_pci_info = {
|
||||
|
|
|
@ -1318,7 +1318,7 @@ static void uhci_class_init(ObjectClass *klass, void *data)
|
|||
k->device_id = info->device_id;
|
||||
k->revision = info->revision;
|
||||
k->class_id = PCI_CLASS_SERIAL_USB;
|
||||
k->no_hotplug = 1;
|
||||
dc->hotpluggable = false;
|
||||
dc->vmsd = &vmstate_uhci;
|
||||
dc->props = uhci_properties;
|
||||
set_bit(DEVICE_CATEGORY_USB, dc->categories);
|
||||
|
|
|
@ -3798,6 +3798,7 @@ static void xhci_class_init(ObjectClass *klass, void *data)
|
|||
dc->vmsd = &vmstate_xhci;
|
||||
dc->props = xhci_properties;
|
||||
dc->reset = xhci_reset;
|
||||
dc->hotpluggable = false;
|
||||
set_bit(DEVICE_CATEGORY_USB, dc->categories);
|
||||
k->init = usb_xhci_initfn;
|
||||
k->vendor_id = PCI_VENDOR_ID_NEC;
|
||||
|
@ -3805,7 +3806,6 @@ static void xhci_class_init(ObjectClass *klass, void *data)
|
|||
k->class_id = PCI_CLASS_SERIAL_USB;
|
||||
k->revision = 0x03;
|
||||
k->is_express = 1;
|
||||
k->no_hotplug = 1;
|
||||
}
|
||||
|
||||
static const TypeInfo xhci_info = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue