diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-18 00:24:27 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-18 00:24:27 +0000 |
commit | b9558d5f86c471a125abf1fb3a3882fb053b1f8c (patch) | |
tree | 707b53ec64e740a7da87d5f36485e3cd9b1c794e /drivers/video/fbmem.c | |
parent | b3ac367c7a3e6047abe74817db27e34e759f279f (diff) |
Merge with Linux 2.3.41.
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r-- | drivers/video/fbmem.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index f6ca52705..6e409ddb4 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -432,8 +432,7 @@ fb_mmap(struct file *file, struct vm_area_struct * vma) /* frame buffer memory */ start = fix.smem_start; - len = (start & ~PAGE_MASK)+fix.smem_len; - len = (len+~PAGE_MASK) & PAGE_MASK; /* someone's on crack. */ + len = PAGE_ALIGN((start & ~PAGE_MASK)+fix.smem_len); if (off >= len) { /* memory mapped io */ off -= len; @@ -441,8 +440,7 @@ fb_mmap(struct file *file, struct vm_area_struct * vma) if (var.accel_flags) return -EINVAL; start = fix.mmio_start; - len = (start & ~PAGE_MASK)+fix.mmio_len; - len = (len+~PAGE_MASK) & PAGE_MASK; + len = PAGE_ALIGN((start & ~PAGE_MASK)+fix.mmio_len); } start &= PAGE_MASK; if ((vma->vm_end - vma->vm_start + off) > len) |