Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev/omapfb: Initialize fb_ops to fbdev I/O-memory helpers

Initialize the instance of struct fb_ops with fbdev initializer
macros for framebuffers in I/O address space. Set the read/write,
draw and mmap callbacks to the correct implementation and avoid
implicit defaults. Also select the necessary I/O helpers in Kconfig.

Fbdev drivers sometimes rely on the callbacks being NULL for a
default implementation to be invoked; hence requiring the I/O
helpers to be built in any case. Setting all callbacks in all
drivers explicitly will allow to make the I/O helpers optional.
This benefits systems that do not use these functions.

No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230927074722.6197-26-tzimmermann@suse.de

+3 -6
+1 -3
drivers/video/fbdev/omap2/omapfb/Kconfig
··· 10 10 depends on GPIOLIB 11 11 select FB_OMAP2_DSS 12 12 select OMAP2_VRFB if ARCH_OMAP2 || ARCH_OMAP3 13 - select FB_CFB_FILLRECT 14 - select FB_CFB_COPYAREA 15 - select FB_CFB_IMAGEBLIT 13 + select FB_IOMEM_HELPERS 16 14 help 17 15 Frame buffer driver for OMAP2+ based boards. 18 16
+2 -3
drivers/video/fbdev/omap2/omapfb/omapfb-main.c
··· 1280 1280 .owner = THIS_MODULE, 1281 1281 .fb_open = omapfb_open, 1282 1282 .fb_release = omapfb_release, 1283 - .fb_fillrect = cfb_fillrect, 1284 - .fb_copyarea = cfb_copyarea, 1285 - .fb_imageblit = cfb_imageblit, 1283 + __FB_DEFAULT_IOMEM_OPS_RDWR, 1286 1284 .fb_blank = omapfb_blank, 1285 + __FB_DEFAULT_IOMEM_OPS_DRAW, 1287 1286 .fb_ioctl = omapfb_ioctl, 1288 1287 .fb_check_var = omapfb_check_var, 1289 1288 .fb_set_par = omapfb_set_par,