diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-06-30 14:12:07 +0200 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-07-09 13:07:02 +0100 |
commit | 0aab0d3a4a62505ab7e79ee0a67fe3f04f6dae23 (patch) | |
tree | 59539fa84519cc5cc7aa24c4c7cb0435edfbdfbb /hw/rtl8139.c | |
parent | e2b19c85ea0f3fd6091386adfd3a2acd21107cb4 (diff) |
qdev: update pci device registration.
Makes pci_qdev_register take a PCIDeviceInfo struct instead of a bunch
of parameters. Also adds config_read and config_write callbacks to
PCIDeviceInfo, so drivers needing these can be converted to the qdev
device API too.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/rtl8139.c')
-rw-r--r-- | hw/rtl8139.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 2280018b81..91165dbff4 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -3499,9 +3499,15 @@ static void pci_rtl8139_init(PCIDevice *dev) #endif /* RTL8139_ONBOARD_TIMER */ } +static PCIDeviceInfo rtl8139_info = { + .qdev.name = "rtl8139", + .qdev.size = sizeof(PCIRTL8139State), + .init = pci_rtl8139_init, +}; + static void rtl8139_register_devices(void) { - pci_qdev_register("rtl8139", sizeof(PCIRTL8139State), pci_rtl8139_init); + pci_qdev_register(&rtl8139_info); } device_init(rtl8139_register_devices) |