diff options
author | sayli karnik <karniksayli1995@gmail.com> | 2016-09-20 03:21:38 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-20 14:01:21 +0200 |
commit | ec9d0754e0c64013278fda87d1bd6b8318747abe (patch) | |
tree | df59a33a51fd30bdfd200898a632d036cae0bfd6 | |
parent | 33d877bb42df3db877677039746a71c93322add2 (diff) |
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>
-rw-r--r-- | drivers/staging/comedi/comedi_fops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index bf922eafe07c..64b3966c5f1f 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2233,7 +2233,7 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma) goto done; } - n_pages = size >> PAGE_SHIFT; + n_pages = vma_pages(vma); /* get reference to current buf map (if any) */ bm = comedi_buf_map_from_subdev_get(s); |