aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorsayli karnik <karniksayli1995@gmail.com>2016-09-20 03:21:38 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-20 14:01:21 +0200
commitec9d0754e0c64013278fda87d1bd6b8318747abe (patch)
treedf59a33a51fd30bdfd200898a632d036cae0bfd6 /drivers/staging/comedi/comedi_fops.c
parentStaging: vt6655: baseband: Remove unnecessary space after a cast (diff)
downloadwireguard-linux-ec9d0754e0c64013278fda87d1bd6b8318747abe.tar.xz
wireguard-linux-ec9d0754e0c64013278fda87d1bd6b8318747abe.zip
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>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
-rw-r--r--drivers/staging/comedi/comedi_fops.c2
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);