diff mbox

[v2,33/38] hw/versatile_pci.c: convert to PCIDeviceInfo to initialize ids

Message ID 58216340bc9596df6d35f9d52272e41002431c93.1305650874.git.yamahata@valinux.co.jp
State New
Headers show

Commit Message

Isaku Yamahata May 17, 2011, 4:55 p.m. UTC
use PCIDeviceInfo to initialize ids.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 hw/versatile_pci.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c
index 2fed8a0..58a8f7e 100644
--- a/hw/versatile_pci.c
+++ b/hw/versatile_pci.c
@@ -133,9 +133,6 @@  static int pci_realview_init(SysBusDevice *dev)
 
 static int versatile_pci_host_init(PCIDevice *d)
 {
-    pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_XILINX);
-    /* Both boards have the same device ID.  Oh well.  */
-    pci_config_set_device_id(d->config, PCI_DEVICE_ID_XILINX_XC2VP30);
     pci_set_word(d->config + PCI_STATUS,
 		 PCI_STATUS_66MHZ | PCI_STATUS_DEVSEL_MEDIUM);
     pci_config_set_class(d->config, PCI_CLASS_PROCESSOR_CO);
@@ -147,6 +144,9 @@  static PCIDeviceInfo versatile_pci_host_info = {
     .qdev.name = "versatile_pci_host",
     .qdev.size = sizeof(PCIDevice),
     .init      = versatile_pci_host_init,
+    .vendor_id = PCI_VENDOR_ID_XILINX,
+    /* Both boards have the same device ID.  Oh well.  */
+    .device_id = PCI_DEVICE_ID_XILINX_XC2VP30,
 };
 
 static void versatile_pci_register_devices(void)