diff options
author | Varun Sethi <Varun.Sethi@freescale.com> | 2013-04-23 10:05:24 +0530 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-04-23 14:55:00 +0200 |
commit | 61e015ac5b4d46c2054a78d9bc82c840274929a0 (patch) | |
tree | e2990506417fa4bdebb73b17e9081f952500c933 /drivers/iommu/amd_iommu.c | |
parent | 9a08d3766874835f4eba1b3d66938326c069d817 (diff) | |
download | talos-obmc-linux-61e015ac5b4d46c2054a78d9bc82c840274929a0.tar.gz talos-obmc-linux-61e015ac5b4d46c2054a78d9bc82c840274929a0.zip |
iommu: Move swap_pci_ref function to drivers/iommu/pci.h.
The swap_pci_ref function is used by the IOMMU API code for
swapping pci device pointers, while determining the iommu
group for the device.
Currently this function was being implemented for different
IOMMU drivers. This patch moves the function to a new file,
drivers/iommu/pci.h so that the implementation can be
shared across various IOMMU drivers.
Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b287ca33833d..685f2821333a 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -46,6 +46,7 @@ #include "amd_iommu_proto.h" #include "amd_iommu_types.h" #include "irq_remapping.h" +#include "pci.h" #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28)) @@ -263,12 +264,6 @@ static bool check_device(struct device *dev) return true; } -static void swap_pci_ref(struct pci_dev **from, struct pci_dev *to) -{ - pci_dev_put(*from); - *from = to; -} - static struct pci_bus *find_hosted_bus(struct pci_bus *bus) { while (!bus->self) { |