summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-05-27 14:42:06 +0900
committerMichael S. Tsirkin <mst@redhat.com>2010-05-31 16:33:52 +0300
commit7713a2b553d8c9ec320772c7bf66ee56089a8cdc (patch)
treef642f62e50321360c372b785169a83c8908a3516 /hw
parent2b948ed3f3e2d26ed20f3a9e5f05b7176bae02b6 (diff)
downloadqemu-7713a2b553d8c9ec320772c7bf66ee56089a8cdc.tar.gz
qemu-7713a2b553d8c9ec320772c7bf66ee56089a8cdc.tar.bz2
qemu-7713a2b553d8c9ec320772c7bf66ee56089a8cdc.zip
pci: clean up of pci_set_default_subsystem_id().
Use pci accessor function. don't return value because it always return 0 and the caller doesn't check the return value. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 8d84651f19..3362842bf2 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -419,14 +419,12 @@ int pci_device_load(PCIDevice *s, QEMUFile *f)
return ret;
}
-static int pci_set_default_subsystem_id(PCIDevice *pci_dev)
+static void pci_set_default_subsystem_id(PCIDevice *pci_dev)
{
- uint16_t *id;
-
- id = (void*)(&pci_dev->config[PCI_SUBSYSTEM_VENDOR_ID]);
- id[0] = cpu_to_le16(pci_default_sub_vendor_id);
- id[1] = cpu_to_le16(pci_default_sub_device_id);
- return 0;
+ pci_set_word(pci_dev->config + PCI_SUBSYSTEM_VENDOR_ID,
+ pci_default_sub_vendor_id);
+ pci_set_word(pci_dev->config + PCI_SUBSYSTEM_ID,
+ pci_default_sub_device_id);
}
/*