[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 15/50] hw/pci: remove obsolete PCIDevice->init()
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 15/50] hw/pci: remove obsolete PCIDevice->init() |
Date: |
Tue, 20 Mar 2018 05:17:20 +0200 |
From: Philippe Mathieu-Daudé <address@hidden>
All PCI devices are now QOM'ified.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/hw/pci/pci.h | 1 -
hw/pci/pci.c | 14 --------------
2 files changed, 15 deletions(-)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index d8c18c7..e28f3fa 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -217,7 +217,6 @@ typedef struct PCIDeviceClass {
DeviceClass parent_class;
void (*realize)(PCIDevice *dev, Error **errp);
- int (*init)(PCIDevice *dev);/* TODO convert to realize() and remove */
PCIUnregisterFunc *exit;
PCIConfigReadFunc *config_read;
PCIConfigWriteFunc *config_write;
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 2174c25..f98efdc 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2049,18 +2049,6 @@ static void pci_qdev_realize(DeviceState *qdev, Error
**errp)
}
}
-static void pci_default_realize(PCIDevice *dev, Error **errp)
-{
- PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev);
-
- if (pc->init) {
- if (pc->init(dev) < 0) {
- error_setg(errp, "Device initialization failed");
- return;
- }
- }
-}
-
PCIDevice *pci_create_multifunction(PCIBus *bus, int devfn, bool multifunction,
const char *name)
{
@@ -2533,13 +2521,11 @@ MemoryRegion *pci_address_space_io(PCIDevice *dev)
static void pci_device_class_init(ObjectClass *klass, void *data)
{
DeviceClass *k = DEVICE_CLASS(klass);
- PCIDeviceClass *pc = PCI_DEVICE_CLASS(klass);
k->realize = pci_qdev_realize;
k->unrealize = pci_qdev_unrealize;
k->bus_type = TYPE_PCI_BUS;
k->props = pci_props;
- pc->realize = pci_default_realize;
}
static void pci_device_class_base_init(ObjectClass *klass, void *data)
--
MST
- [Qemu-devel] [PULL v2 02/50] virtio-net: use 64-bit values for feature flags, (continued)
- [Qemu-devel] [PULL v2 02/50] virtio-net: use 64-bit values for feature flags, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 03/50] virtio-net: add linkspeed and duplex settings to virtio-net, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 07/50] acpi: add build_append_gas() helper for Generic Address Structure, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 04/50] acpi: remove unused acpi-dsdt.aml, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 06/50] acpi: reuse AcpiGenericAddress instead of Acpi20GenericAddress, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 05/50] pc: replace pm object initialization with one-liner in acpi_get_pm_info(), Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 08/50] acpi: move ACPI_PORT_SMI_CMD define to header it belongs to, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 01/50] scripts/update-linux-headers: add ethtool.h and update to 4.16.0-rc4, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 09/50] pc: acpi: isolate FADT specific data into AcpiFadtData structure, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 10/50] pc: acpi: use build_append_foo() API to construct FADT, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 15/50] hw/pci: remove obsolete PCIDevice->init(),
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 13/50] tests: acpi: don't read all fields in test_acpi_fadt_table(), Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 14/50] standard-headers: update virtio_net.h, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 16/50] pc-dimm: make qmp_pc_dimm_device_list() sort devices by address, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 19/50] tests/bios-tables-test: add test cases for DIMM proximity, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 18/50] hw/acpi-build: build SRAT memory affinity structures for DIMM devices, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 17/50] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 12/50] virt_arm: acpi: reuse common build_fadt(), Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 11/50] acpi: move build_fadt() from i386 specific to generic ACPI source, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 20/50] test/acpi-test-data: add ACPI tables for dimmpxm test, Michael S. Tsirkin, 2018/03/19
- [Qemu-devel] [PULL v2 21/50] Makefile: add target to print generated files, Michael S. Tsirkin, 2018/03/19