Skip to content

Commit c205a67

Browse files
author
Thomas Zimmermann
committed
fbdev: Avoid file argument in fb_pgprotect()
Only PowerPC's fb_pgprotect() needs the file argument, although the implementation in either phys_mem_access_prot() or pci_phys_mem_access_prot() does not use it. Pass NULL to the internal helper in preparation of further updates. A later patch will remove the file parameter from fb_pgprotect(). While at it, replace the shift operation with PHYS_PFN(). v5: * state function names in commit description (Javier) Suggested-by: Christophe Leroy <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3f257bc commit c205a67

File tree

1 file changed

+6
-1
lines changed
  • arch/powerpc/include/asm

1 file changed

+6
-1
lines changed

arch/powerpc/include/asm/fb.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
1010
unsigned long off)
1111
{
12-
vma->vm_page_prot = phys_mem_access_prot(file, off >> PAGE_SHIFT,
12+
/*
13+
* PowerPC's implementation of phys_mem_access_prot() does
14+
* not use the file argument. Set it to NULL in preparation
15+
* of later updates to the interface.
16+
*/
17+
vma->vm_page_prot = phys_mem_access_prot(NULL, PHYS_PFN(off),
1318
vma->vm_end - vma->vm_start,
1419
vma->vm_page_prot);
1520
}

0 commit comments

Comments
 (0)