hw/sh_pci.c: convert to PCIDeviceInfo to initialize ids
authorIsaku Yamahata <yamahata@valinux.co.jp>
Wed, 25 May 2011 01:58:26 +0000 (10:58 +0900)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 12 Jun 2011 07:33:36 +0000 (10:33 +0300)
use PCIDeviceInfo to initialize ids.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/sh_pci.c

index e99d8dbfb50347608e91daed9d99afc23b9baceb..a076cf2ff0eb717c3c56f072ebbef424cea8d6df 100644 (file)
@@ -137,8 +137,6 @@ static int sh_pci_init_device(SysBusDevice *dev)
 
 static int sh_pci_host_init(PCIDevice *d)
 {
-    pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_HITACHI);
-    pci_config_set_device_id(d->config, PCI_DEVICE_ID_HITACHI_SH7751R);
     pci_set_word(d->config + PCI_COMMAND, PCI_COMMAND_WAIT);
     pci_set_word(d->config + PCI_STATUS, PCI_STATUS_CAP_LIST |
                  PCI_STATUS_FAST_BACK | PCI_STATUS_DEVSEL_MEDIUM);
@@ -149,6 +147,8 @@ static PCIDeviceInfo sh_pci_host_info = {
     .qdev.name = "sh_pci_host",
     .qdev.size = sizeof(PCIDevice),
     .init      = sh_pci_host_init,
+    .vendor_id = PCI_VENDOR_ID_HITACHI,
+    .device_id = PCI_DEVICE_ID_HITACHI_SH7751R,
 };
 
 static void sh_pci_register_devices(void)