1
0
Fork 0

HSI: cmt_speech: use vma_pages().

Replace explicit computation of vma page count by a call to
vma_pages()

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
hifive-unleashed-5.1
Muhammad Falak R Wani 2016-05-21 18:49:21 +05:30 committed by Sebastian Reichel
parent 1a695a905c
commit f6004b7bc6
1 changed files with 1 additions and 1 deletions

View File

@ -1275,7 +1275,7 @@ static int cs_char_mmap(struct file *file, struct vm_area_struct *vma)
if (vma->vm_end < vma->vm_start)
return -EINVAL;
if (((vma->vm_end - vma->vm_start) >> PAGE_SHIFT) != 1)
if (vma_pages(vma) != 1)
return -EINVAL;
vma->vm_flags |= VM_IO | VM_DONTDUMP | VM_DONTEXPAND;