rk29: vpu_mem: fix for v2.6.36
author黄涛 <huangtao@rock-chips.com>
Mon, 1 Aug 2011 03:19:42 +0000 (11:19 +0800)
committer黄涛 <huangtao@rock-chips.com>
Mon, 1 Aug 2011 03:19:42 +0000 (11:19 +0800)
arch/arm/mach-rk29/vpu_mem.c

index 89e8e968d64c3f10a145e9c60ecc4e6d845de44e..608c4e1d94f7a9ce38d188313eb71c5a9cc59a5c 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/debugfs.h>\r
 #include <linux/mempolicy.h>\r
 #include <linux/sched.h>\r
+#include <linux/dma-mapping.h>\r
 #include <asm/io.h>\r
 #include <asm/uaccess.h>\r
 #include <asm/cacheflush.h>\r
@@ -841,7 +842,7 @@ void vpu_mem_cache_opt(struct file *file, long index, unsigned int cmd)
     up_read(&vdm_rwsem);\r
 }\r
 \r
-static pgprot_t phys_mem_access_prot(struct file *file, pgprot_t vma_prot)\r
+static pgprot_t vpu_mem_phys_mem_access_prot(struct file *file, pgprot_t vma_prot)\r
 {\r
 #ifdef pgprot_noncached\r
        if (vpu_mem.cached == 0 || file->f_flags & O_SYNC)\r
@@ -918,7 +919,7 @@ static int vpu_mem_mmap(struct file *file, struct vm_area_struct *vma)
        }\r
 \r
        vma->vm_pgoff = vpu_mem.base >> PAGE_SHIFT;\r
-       vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_page_prot);\r
+       vma->vm_page_prot = vpu_mem_phys_mem_access_prot(file, vma->vm_page_prot);\r
 \r
        if (vpu_mem_map_pfn_range(vma, vma_size)) {\r
                printk(KERN_INFO "vpu_mem: mmap failed in kernel!\n");\r