summaryrefslogtreecommitdiffstats
path: root/hw/misc/edu.c
diff options
context:
space:
mode:
authorCao jin <caoj.fnst@cn.fujitsu.com>2015-12-18 16:55:35 +0800
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:23 -0600
commit0ddb0cbb7fbc63c5b4559d58968968cf28e35b26 (patch)
tree1a2ec1586d7a97ceee346d1978268ba691458907 /hw/misc/edu.c
parent80baef037483ce72cea19f20c32c720b3cb9aef3 (diff)
downloadhqemu-0ddb0cbb7fbc63c5b4559d58968968cf28e35b26.zip
hqemu-0ddb0cbb7fbc63c5b4559d58968968cf28e35b26.tar.gz
hw/misc/edu: Convert to realize()
for educational PCI device Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/misc/edu.c')
-rw-r--r--hw/misc/edu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/misc/edu.c b/hw/misc/edu.c
index fe50b42..43d5b18 100644
--- a/hw/misc/edu.c
+++ b/hw/misc/edu.c
@@ -327,7 +327,7 @@ static void *edu_fact_thread(void *opaque)
return NULL;
}
-static int pci_edu_init(PCIDevice *pdev)
+static void pci_edu_realize(PCIDevice *pdev, Error **errp)
{
EduState *edu = DO_UPCAST(EduState, pdev, pdev);
uint8_t *pci_conf = pdev->config;
@@ -344,8 +344,6 @@ static int pci_edu_init(PCIDevice *pdev)
memory_region_init_io(&edu->mmio, OBJECT(edu), &edu_mmio_ops, edu,
"edu-mmio", 1 << 20);
pci_register_bar(pdev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &edu->mmio);
-
- return 0;
}
static void pci_edu_uninit(PCIDevice *pdev)
@@ -385,7 +383,7 @@ static void edu_class_init(ObjectClass *class, void *data)
{
PCIDeviceClass *k = PCI_DEVICE_CLASS(class);
- k->init = pci_edu_init;
+ k->realize = pci_edu_realize;
k->exit = pci_edu_uninit;
k->vendor_id = PCI_VENDOR_ID_QEMU;
k->device_id = 0x11e8;
OpenPOWER on IntegriCloud