mm: replace vma->vm_flags direct modifications with modifier calls
[linux-block.git] / drivers / gpu / drm / tegra / gem.c
index 979e7bc902f6a383038095f45bc89fda24de2ab6..bce991a2ccc0b0100bd68c98e614582ecb997b1c 100644 (file)
@@ -574,7 +574,7 @@ int __tegra_gem_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma)
                 * and set the vm_pgoff (used as a fake buffer offset by DRM)
                 * to 0 as we want to map the whole buffer.
                 */
-               vma->vm_flags &= ~VM_PFNMAP;
+               vm_flags_clear(vma, VM_PFNMAP);
                vma->vm_pgoff = 0;
 
                err = dma_mmap_wc(gem->dev->dev, vma, bo->vaddr, bo->iova,
@@ -588,8 +588,7 @@ int __tegra_gem_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma)
        } else {
                pgprot_t prot = vm_get_page_prot(vma->vm_flags);
 
-               vma->vm_flags |= VM_MIXEDMAP;
-               vma->vm_flags &= ~VM_PFNMAP;
+               vm_flags_mod(vma, VM_MIXEDMAP, VM_PFNMAP);
 
                vma->vm_page_prot = pgprot_writecombine(prot);
        }