aboutsummaryrefslogtreecommitdiff
path: root/hw/msix.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-09-06 16:46:16 +0900
committerMichael S. Tsirkin <mst@redhat.com>2010-09-07 20:10:04 +0300
commitca77089d2d8e73283bfc73f03d954504561e1ce8 (patch)
tree7279dcdd4fc5a563ac788afe84928317e5007493 /hw/msix.c
parent68f799944b72387c0ef9535612a212a5ea492059 (diff)
pci: consolidate pci_add_capability_at_offset() into pci_add_capability().
By making pci_add_capability() the special case of pci_add_capability_at_offset() of offset = 0, consolidate pci_add_capability_at_offset() into pci_add_capability(). Cc: Stefan Weil <weil@mail.berlios.de> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/msix.c')
-rw-r--r--hw/msix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/msix.c b/hw/msix.c
index d99403a0e9..7ce63ebe63 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -73,7 +73,8 @@ static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries,
}
pdev->msix_bar_size = new_size;
- config_offset = pci_add_capability(pdev, PCI_CAP_ID_MSIX, MSIX_CAP_LENGTH);
+ config_offset = pci_add_capability(pdev, PCI_CAP_ID_MSIX,
+ 0, MSIX_CAP_LENGTH);
if (config_offset < 0)
return config_offset;
config = pdev->config + config_offset;