diff options
Diffstat (limited to 'drivers/pci/iov.c')
-rw-r--r-- | drivers/pci/iov.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 5bca0e1a2799..27b98c361823 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -95,7 +95,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset) | |||
95 | virtfn->multifunction = 0; | 95 | virtfn->multifunction = 0; |
96 | 96 | ||
97 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { | 97 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { |
98 | res = dev->resource + PCI_IOV_RESOURCES + i; | 98 | res = &dev->resource[i + PCI_IOV_RESOURCES]; |
99 | if (!res->parent) | 99 | if (!res->parent) |
100 | continue; | 100 | continue; |
101 | virtfn->resource[i].name = pci_name(virtfn); | 101 | virtfn->resource[i].name = pci_name(virtfn); |
@@ -212,7 +212,7 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn) | |||
212 | nres = 0; | 212 | nres = 0; |
213 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { | 213 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { |
214 | bars |= (1 << (i + PCI_IOV_RESOURCES)); | 214 | bars |= (1 << (i + PCI_IOV_RESOURCES)); |
215 | res = dev->resource + PCI_IOV_RESOURCES + i; | 215 | res = &dev->resource[i + PCI_IOV_RESOURCES]; |
216 | if (res->parent) | 216 | if (res->parent) |
217 | nres++; | 217 | nres++; |
218 | } | 218 | } |
@@ -373,7 +373,7 @@ found: | |||
373 | 373 | ||
374 | nres = 0; | 374 | nres = 0; |
375 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { | 375 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { |
376 | res = dev->resource + PCI_IOV_RESOURCES + i; | 376 | res = &dev->resource[i + PCI_IOV_RESOURCES]; |
377 | bar64 = __pci_read_base(dev, pci_bar_unknown, res, | 377 | bar64 = __pci_read_base(dev, pci_bar_unknown, res, |
378 | pos + PCI_SRIOV_BAR + i * 4); | 378 | pos + PCI_SRIOV_BAR + i * 4); |
379 | if (!res->flags) | 379 | if (!res->flags) |
@@ -417,7 +417,7 @@ found: | |||
417 | 417 | ||
418 | failed: | 418 | failed: |
419 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { | 419 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { |
420 | res = dev->resource + PCI_IOV_RESOURCES + i; | 420 | res = &dev->resource[i + PCI_IOV_RESOURCES]; |
421 | res->flags = 0; | 421 | res->flags = 0; |
422 | } | 422 | } |
423 | 423 | ||