fbdev: Move default fb_mmap code into helper function
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 27 Nov 2023 13:15:59 +0000 (14:15 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 29 Nov 2023 11:20:49 +0000 (12:20 +0100)
commit33253d9e01d40542f07aaf718a655893cd2949e5
treef3f0873961e38878d426484fbaa62325ffe0bb36
parent76f92201b821dd2f442ebe37ec9b52b525855bac
fbdev: Move default fb_mmap code into helper function

Move the default fb_mmap code for I/O address spaces into the helper
function fb_io_mmap(). The helper can either be called via struct
fb_ops.fb_mmap or as the default if no fb_mmap has been set. Also
set the new helper in __FB_DEFAULT_IOMEM_OPS_MMAP.

In the mid-term, fb_io_mmap() is supposed to become optional. Fbdev
drivers will initialize their struct fb_ops.fb_mmap to the helper
and select a corresponding Kconfig token. The helper can then be made
optional at compile time.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-31-tzimmermann@suse.de
drivers/video/fbdev/core/fb_chrdev.c
drivers/video/fbdev/core/fb_io_fops.c
include/linux/fb.h