mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 00:54:09 +08:00
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: sayli karnik <karniksayli1995@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
33d877bb42
commit
ec9d0754e0
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user