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>
This commit is contained in:
Sandhya Bankar 2016-03-06 12:35:29 +05:30 committed by Greg Kroah-Hartman
parent f3b1e4db82
commit 44b8c793fc
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}