diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-01-19 15:52:29 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-02-26 12:42:16 +0100 |
commit | 7ee6c1e182cca6ccf5253569fca3d05826efb4e9 (patch) | |
tree | 079aa8ac68eb59c17a1aa3a3da58efb9b8890c24 /include | |
parent | 133e9b228df16d11de01529c217417e78d1d9370 (diff) |
pci: Permit incremental conversion of device models to realize
Call the new PCIDeviceClass method realize(). Default it to
pci_default_realize(), which calls old method init().
To convert a device model, make it implement realize() rather than
init().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/pci/pci.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index bdee464e61..3164fc3a4f 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -185,7 +185,8 @@ typedef struct PCIINTxRoute { typedef struct PCIDeviceClass { DeviceClass parent_class; - int (*init)(PCIDevice *dev); + void (*realize)(PCIDevice *dev, Error **errp); + int (*init)(PCIDevice *dev);/* TODO convert to realize() and remove */ PCIUnregisterFunc *exit; PCIConfigReadFunc *config_read; PCIConfigWriteFunc *config_write; |