powerpc/fb: Call internal __phys_mem_access_prot() in fbdev code
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 22 Sep 2023 08:04:59 +0000 (10:04 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 Nov 2023 04:24:52 +0000 (15:24 +1100)
Call __phys_mem_access_prot() from the fbdev mmap helper
pgprot_framebuffer(). Allows to avoid the file argument of NULL.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230922080636.26762-6-tzimmermann@suse.de
arch/powerpc/include/asm/fb.h

index 3cecf14d51de8661a2e9af0df8244c3b37c2886c..c0c5d1df7ad1ec796124099285110c2b0e40f48e 100644 (file)
@@ -8,12 +8,7 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
                                          unsigned long vm_start, unsigned long vm_end,
                                          unsigned long offset)
 {
-       /*
-        * PowerPC's implementation of phys_mem_access_prot() does
-        * not use the file argument. Set it to NULL in preparation
-        * of later updates to the interface.
-        */
-       return phys_mem_access_prot(NULL, PHYS_PFN(offset), vm_end - vm_start, prot);
+       return __phys_mem_access_prot(PHYS_PFN(offset), vm_end - vm_start, prot);
 }
 #define pgprot_framebuffer pgprot_framebuffer