diff options
author | Shuah Khan <shuah.khan@hp.com> | 2013-02-28 01:07:30 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-03-26 23:21:58 +0100 |
commit | 6f2729bab2cc386bb603698646dacd9ab6297ba0 (patch) | |
tree | 40e0daad672d14546cf810bfd77bb1006575a999 /drivers/iommu/amd_iommu_init.c | |
parent | iommu/amd: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI (diff) | |
download | linux-6f2729bab2cc386bb603698646dacd9ab6297ba0.tar.xz linux-6f2729bab2cc386bb603698646dacd9ab6297ba0.zip |
iommu/amd: Remove calc_devid() and use PCI_DEVID() from PCI
Change to remove calc_devid() and use PCI_DEVID() from PCI instead.
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index f8ed6f143d9d..551768af3fe7 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -406,7 +406,7 @@ static int __init find_last_devid_on_pci(int bus, int dev, int fn, int cap_ptr) u32 cap; cap = read_pci_config(bus, dev, fn, cap_ptr+MMIO_RANGE_OFFSET); - update_last_devid(calc_devid(MMIO_GET_BUS(cap), MMIO_GET_LD(cap))); + update_last_devid(PCI_DEVID(MMIO_GET_BUS(cap), MMIO_GET_LD(cap))); return 0; } @@ -1128,9 +1128,9 @@ static int iommu_init_pci(struct amd_iommu *iommu) pci_read_config_dword(iommu->dev, cap_ptr + MMIO_MISC_OFFSET, &misc); - iommu->first_device = calc_devid(MMIO_GET_BUS(range), + iommu->first_device = PCI_DEVID(MMIO_GET_BUS(range), MMIO_GET_FD(range)); - iommu->last_device = calc_devid(MMIO_GET_BUS(range), + iommu->last_device = PCI_DEVID(MMIO_GET_BUS(range), MMIO_GET_LD(range)); if (!(iommu->cap & (1 << IOMMU_CAP_IOTLB))) |