diff options
author | Joerg Roedel <jroedel@suse.de> | 2017-02-01 16:56:46 +0100 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2017-02-10 13:44:57 +0100 |
commit | 39ab9555c24110671f8dc671311a26e5c985b592 (patch) | |
tree | 3b2a4fc649308a7116b48a0ce3a415ac28b814c2 /drivers/iommu/amd_iommu_init.c | |
parent | b0119e870837dcd15a207b4701542ebac5d19b45 (diff) | |
download | talos-obmc-linux-39ab9555c24110671f8dc671311a26e5c985b592.tar.gz talos-obmc-linux-39ab9555c24110671f8dc671311a26e5c985b592.zip |
iommu: Add sysfs bindings for struct iommu_device
There is currently support for iommu sysfs bindings, but
those need to be implemented in the IOMMU drivers. Add a
more generic version of this by adding a struct device to
struct iommu_device and use that for the sysfs bindings.
Also convert the AMD and Intel IOMMU driver to make use of
it.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index b7ccfb21b271..6b9e66122528 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -1637,10 +1637,8 @@ static int iommu_init_pci(struct amd_iommu *iommu) amd_iommu_erratum_746_workaround(iommu); amd_iommu_ats_write_check_workaround(iommu); - iommu->iommu_dev = iommu_device_create(&iommu->dev->dev, iommu, - amd_iommu_groups, "ivhd%d", - iommu->index); - + iommu_device_sysfs_add(&iommu->iommu, &iommu->dev->dev, + amd_iommu_groups, "ivhd%d", iommu->index); iommu_device_set_ops(&iommu->iommu, &amd_iommu_ops); iommu_device_register(&iommu->iommu); |