Merge tag 'for-next-dma_ops' of git://git.kernel.org/pub/scm/linux/kernel/git/dledfor...
[sfrench/cifs-2.6.git] / drivers / iommu / amd_iommu.c
index 09bd3b290bb852354b0fbaef76d6710c13dfc885..98940d1392cb0cd19d648b6a25f2a5ba36c052d4 100644 (file)
@@ -117,7 +117,7 @@ const struct iommu_ops amd_iommu_ops;
 static ATOMIC_NOTIFIER_HEAD(ppr_notifier);
 int amd_iommu_max_glx_val = -1;
 
-static struct dma_map_ops amd_iommu_dma_ops;
+static const struct dma_map_ops amd_iommu_dma_ops;
 
 /*
  * This struct contains device specific data for the IOMMU
@@ -519,7 +519,7 @@ static void iommu_uninit_device(struct device *dev)
        iommu_group_remove_device(dev);
 
        /* Remove dma-ops */
-       dev->archdata.dma_ops = NULL;
+       dev->dma_ops = NULL;
 
        /*
         * We keep dev_data around for unplugged devices and reuse it when the
@@ -2168,7 +2168,7 @@ static int amd_iommu_add_device(struct device *dev)
                                dev_name(dev));
 
                iommu_ignore_device(dev);
-               dev->archdata.dma_ops = &nommu_dma_ops;
+               dev->dma_ops = &nommu_dma_ops;
                goto out;
        }
        init_iommu_group(dev);
@@ -2185,7 +2185,7 @@ static int amd_iommu_add_device(struct device *dev)
        if (domain->type == IOMMU_DOMAIN_IDENTITY)
                dev_data->passthrough = true;
        else
-               dev->archdata.dma_ops = &amd_iommu_dma_ops;
+               dev->dma_ops = &amd_iommu_dma_ops;
 
 out:
        iommu_completion_wait(iommu);
@@ -2732,7 +2732,7 @@ static int amd_iommu_dma_supported(struct device *dev, u64 mask)
        return check_device(dev);
 }
 
-static struct dma_map_ops amd_iommu_dma_ops = {
+static const struct dma_map_ops amd_iommu_dma_ops = {
        .alloc          = alloc_coherent,
        .free           = free_coherent,
        .map_page       = map_page,