summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorSandhya Bankar <bankarsandhya512@gmail.com>2016-03-06 12:35:29 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-10 19:34:22 -0800
commit44b8c793fc0d63060c6c87f0af4f9b367e2ec4fc (patch)
tree87a37bf79466ec84b59a2f3d6899f18aabbd0659 /drivers/staging/comedi
parentf3b1e4db825aeef5337501c88c15894ac33f732e (diff)
downloadlinux-44b8c793fc0d63060c6c87f0af4f9b367e2ec4fc.tar.bz2
Staging: comedi: Use predefined macro offset_in_page() instead of (addr & ~PAGE_MASK).
Use predefined macro offset_in_page() instead of (addr & ~PAGE_MASK). Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-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 d1cf6a1c92a4..7c7b477b0f28 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2224,7 +2224,7 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma)
retval = -EFAULT;
goto done;
}
- if (size & (~PAGE_MASK)) {
+ if (offset_in_page(size)) {
retval = -EFAULT;
goto done;
}