diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2011-05-25 10:58:25 +0900 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-06-12 10:33:36 +0300 |
commit | 7cba16a748b3ed7aba1a94304869fcfa9b5c0396 (patch) | |
tree | 1f3ca4ba1e697fdda65d2ee85d738565b2dff381 | |
parent | 96c05abc904c6f74b60981d956cee531920e4cdf (diff) | |
download | hqemu-7cba16a748b3ed7aba1a94304869fcfa9b5c0396.zip hqemu-7cba16a748b3ed7aba1a94304869fcfa9b5c0396.tar.gz |
hw/rtl8139.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | hw/rtl8139.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/rtl8139.c b/hw/rtl8139.c index c7c7a3c..34e3a9e 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -3453,10 +3453,6 @@ static int pci_rtl8139_init(PCIDevice *dev) uint8_t *pci_conf; pci_conf = s->dev.config; - pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK); - pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_8139); - pci_conf[PCI_REVISION_ID] = RTL8139_PCI_REVID; /* >=0x20 is for 8139C+ */ - pci_config_set_class(pci_conf, PCI_CLASS_NETWORK_ETHERNET); pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin 0 */ /* TODO: start of capability list, but no capability * list bit in status register, and offset 0xdc seems unused. */ @@ -3510,6 +3506,10 @@ static PCIDeviceInfo rtl8139_info = { .init = pci_rtl8139_init, .exit = pci_rtl8139_uninit, .romfile = "pxe-rtl8139.rom", + .vendor_id = PCI_VENDOR_ID_REALTEK, + .device_id = PCI_DEVICE_ID_REALTEK_8139, + .revision = RTL8139_PCI_REVID, /* >=0x20 is for 8139C+ */ + .class_id = PCI_CLASS_NETWORK_ETHERNET, .qdev.props = (Property[]) { DEFINE_NIC_PROPERTIES(RTL8139State, conf), DEFINE_PROP_END_OF_LIST(), |