mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 03:06:10 +00:00
acornfb: remove fb_mmap function
The driver's fb_mmap function is essentially the same as a generic fb_mmap function. Delete driver's function and use the generic one. A difference is that generic function marks frame buffer memory as VM_IO | VM_RESERVED. The driver's function marks it as VM_IO only. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
24f01dcb53
commit
34308fd4a2
1 changed files with 0 additions and 38 deletions
|
@ -859,43 +859,6 @@ acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Note that we are entered with the kernel locked.
|
||||
*/
|
||||
static int
|
||||
acornfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
{
|
||||
unsigned long off, start;
|
||||
u32 len;
|
||||
|
||||
off = vma->vm_pgoff << PAGE_SHIFT;
|
||||
|
||||
start = info->fix.smem_start;
|
||||
len = PAGE_ALIGN(start & ~PAGE_MASK) + info->fix.smem_len;
|
||||
start &= PAGE_MASK;
|
||||
if ((vma->vm_end - vma->vm_start + off) > len)
|
||||
return -EINVAL;
|
||||
off += start;
|
||||
vma->vm_pgoff = off >> PAGE_SHIFT;
|
||||
|
||||
/* This is an IO map - tell maydump to skip this VMA */
|
||||
vma->vm_flags |= VM_IO;
|
||||
|
||||
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
|
||||
|
||||
/*
|
||||
* Don't alter the page protection flags; we want to keep the area
|
||||
* cached for better performance. This does mean that we may miss
|
||||
* some updates to the screen occasionally, but process switches
|
||||
* should cause the caches and buffers to be flushed often enough.
|
||||
*/
|
||||
if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
|
||||
vma->vm_end - vma->vm_start,
|
||||
vma->vm_page_prot))
|
||||
return -EAGAIN;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct fb_ops acornfb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.fb_check_var = acornfb_check_var,
|
||||
|
@ -905,7 +868,6 @@ static struct fb_ops acornfb_ops = {
|
|||
.fb_fillrect = cfb_fillrect,
|
||||
.fb_copyarea = cfb_copyarea,
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_mmap = acornfb_mmap,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue