diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2009-06-16 18:34:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 22:47:59 -0400 |
commit | 34308fd4a22b4c24f54951e47d14e6ae5de6e150 (patch) | |
tree | b5582079e5c53baf899d4fb1b8c523888dcc31ed | |
parent | 24f01dcb53a950999f42f55123f7bc4ccda4ca57 (diff) |
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>
-rw-r--r-- | drivers/video/acornfb.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c index 6995fe1e86d4..0bcc59eb37fa 100644 --- a/drivers/video/acornfb.c +++ b/drivers/video/acornfb.c | |||
@@ -859,43 +859,6 @@ acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) | |||
859 | return 0; | 859 | return 0; |
860 | } | 860 | } |
861 | 861 | ||
862 | /* | ||
863 | * Note that we are entered with the kernel locked. | ||
864 | */ | ||
865 | static int | ||
866 | acornfb_mmap(struct fb_info *info, struct vm_area_struct *vma) | ||
867 | { | ||
868 | unsigned long off, start; | ||
869 | u32 len; | ||
870 | |||
871 | off = vma->vm_pgoff << PAGE_SHIFT; | ||
872 | |||
873 | start = info->fix.smem_start; | ||
874 | len = PAGE_ALIGN(start & ~PAGE_MASK) + info->fix.smem_len; | ||
875 | start &= PAGE_MASK; | ||
876 | if ((vma->vm_end - vma->vm_start + off) > len) | ||
877 | return -EINVAL; | ||
878 | off += start; | ||
879 | vma->vm_pgoff = off >> PAGE_SHIFT; | ||
880 | |||
881 | /* This is an IO map - tell maydump to skip this VMA */ | ||
882 | vma->vm_flags |= VM_IO; | ||
883 | |||
884 | vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); | ||
885 | |||
886 | /* | ||
887 | * Don't alter the page protection flags; we want to keep the area | ||
888 | * cached for better performance. This does mean that we may miss | ||
889 | * some updates to the screen occasionally, but process switches | ||
890 | * should cause the caches and buffers to be flushed often enough. | ||
891 | */ | ||
892 | if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, | ||
893 | vma->vm_end - vma->vm_start, | ||
894 | vma->vm_page_prot)) | ||
895 | return -EAGAIN; | ||
896 | return 0; | ||
897 | } | ||
898 | |||
899 | static struct fb_ops acornfb_ops = { | 862 | static struct fb_ops acornfb_ops = { |
900 | .owner = THIS_MODULE, | 863 | .owner = THIS_MODULE, |
901 | .fb_check_var = acornfb_check_var, | 864 | .fb_check_var = acornfb_check_var, |
@@ -905,7 +868,6 @@ static struct fb_ops acornfb_ops = { | |||
905 | .fb_fillrect = cfb_fillrect, | 868 | .fb_fillrect = cfb_fillrect, |
906 | .fb_copyarea = cfb_copyarea, | 869 | .fb_copyarea = cfb_copyarea, |
907 | .fb_imageblit = cfb_imageblit, | 870 | .fb_imageblit = cfb_imageblit, |
908 | .fb_mmap = acornfb_mmap, | ||
909 | }; | 871 | }; |
910 | 872 | ||
911 | /* | 873 | /* |