diff options
-rw-r--r-- | drivers/pci/iov.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index b2e8322755c1..25dbe85c4217 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -41,8 +41,7 @@ int pci_iov_vf_id(struct pci_dev *dev) return -EINVAL; pf = pci_physfn(dev); - return (((dev->bus->number << 8) + dev->devfn) - - ((pf->bus->number << 8) + pf->devfn + pf->sriov->offset)) / + return (pci_dev_id(dev) - (pci_dev_id(pf) + pf->sriov->offset)) / pf->sriov->stride; } EXPORT_SYMBOL_GPL(pci_iov_vf_id); |