diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-04 12:22:06 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-27 10:50:50 -0600 |
commit | 40021f08882aaef93c66c8c740087b6d3031b63a (patch) | |
tree | a0429c040df66503d807770a3b89da9a0c70d8ac /hw/macio.c | |
parent | 6e4ec3f9bb32d6f41e4fb30b872d2b7b084bc9a9 (diff) |
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/macio.c')
-rw-r--r-- | hw/macio.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/hw/macio.c b/hw/macio.c index 357e0ea41a..ae9db08cbd 100644 --- a/hw/macio.c +++ b/hw/macio.c @@ -81,12 +81,19 @@ static int macio_initfn(PCIDevice *d) return 0; } -static PCIDeviceInfo macio_info = { - .qdev.name = "macio", - .qdev.size = sizeof(MacIOState), - .init = macio_initfn, - .vendor_id = PCI_VENDOR_ID_APPLE, - .class_id = PCI_CLASS_OTHERS << 8, +static void macio_class_init(ObjectClass *klass, void *data) +{ + PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); + + k->init = macio_initfn; + k->vendor_id = PCI_VENDOR_ID_APPLE; + k->class_id = PCI_CLASS_OTHERS << 8; +} + +static DeviceInfo macio_info = { + .name = "macio", + .size = sizeof(MacIOState), + .class_init = macio_class_init, }; static void macio_register(void) |