diff options
author | Vasant Hegde <vasant.hegde@amd.com> | 2022-07-06 14:37:51 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2022-07-07 10:37:32 +0300 |
commit | d02674d71c5a625e5b2e4323edbf05ebedaf4273 (patch) | |
tree | 576e59050b2d1a31eeafdd4fded978199d8efac7 /drivers/iommu/amd/amd_iommu_types.h | |
parent | 83874d51eb4a51725c9403e11476a433add98c34 (diff) | |
download | linux-d02674d71c5a625e5b2e4323edbf05ebedaf4273.tar.xz |
iommu/amd: Update struct iommu_dev_data definition
struct iommu_dev_data contains member "pdev" to point to pci_dev. This is
valid for only PCI devices and for other devices this will be NULL. This
causes unnecessary "pdev != NULL" check at various places.
Replace "struct pci_dev" member with "struct device" and use to_pci_dev()
to get pci device reference as needed. Also adjust setup_aliases() and
clone_aliases() function.
No functional change intended.
Co-developed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20220706113825.25582-2-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd/amd_iommu_types.h')
-rw-r--r-- | drivers/iommu/amd/amd_iommu_types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h index 72d0f5e2f651..9b563f850f1d 100644 --- a/drivers/iommu/amd/amd_iommu_types.h +++ b/drivers/iommu/amd/amd_iommu_types.h @@ -689,7 +689,7 @@ struct iommu_dev_data { struct list_head list; /* For domain->dev_list */ struct llist_node dev_data_list; /* For global dev_data_list */ struct protection_domain *domain; /* Domain the device is bound to */ - struct pci_dev *pdev; + struct device *dev; u16 devid; /* PCI Device ID */ bool iommu_v2; /* Device can make use of IOMMUv2 */ struct { |