Commit ec9d0754 authored by sayli karnik's avatar sayli karnik Committed by Greg Kroah-Hartman

staging: comedi: Use vma_pages function on vma object instead of explicit computation

This patch uses vma_pages function on vma object instead of explicit
computation.
Signed-off-by: default avatarsayli karnik <karniksayli1995@gmail.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 33d877bb
...@@ -2233,7 +2233,7 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -2233,7 +2233,7 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma)
goto done; goto done;
} }
n_pages = size >> PAGE_SHIFT; n_pages = vma_pages(vma);
/* get reference to current buf map (if any) */ /* get reference to current buf map (if any) */
bm = comedi_buf_map_from_subdev_get(s); bm = comedi_buf_map_from_subdev_get(s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment