mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 04:02:26 +00:00
staging/sm750fb: Initialize fb_ops with fbdev macros
Initialize all instances 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 helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based 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. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-27-tzimmermann@suse.de
This commit is contained in:
parent
f7c8a04657
commit
dc0ad215e5
@ -665,31 +665,28 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
|
||||
|
||||
static const struct fb_ops lynxfb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
FB_DEFAULT_IOMEM_OPS,
|
||||
.fb_check_var = lynxfb_ops_check_var,
|
||||
.fb_set_par = lynxfb_ops_set_par,
|
||||
.fb_setcolreg = lynxfb_ops_setcolreg,
|
||||
.fb_blank = lynxfb_ops_blank,
|
||||
.fb_pan_display = lynxfb_ops_pan_display,
|
||||
.fb_fillrect = cfb_fillrect,
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_copyarea = cfb_copyarea,
|
||||
};
|
||||
|
||||
static const struct fb_ops lynxfb_ops_with_cursor = {
|
||||
.owner = THIS_MODULE,
|
||||
FB_DEFAULT_IOMEM_OPS,
|
||||
.fb_check_var = lynxfb_ops_check_var,
|
||||
.fb_set_par = lynxfb_ops_set_par,
|
||||
.fb_setcolreg = lynxfb_ops_setcolreg,
|
||||
.fb_blank = lynxfb_ops_blank,
|
||||
.fb_pan_display = lynxfb_ops_pan_display,
|
||||
.fb_fillrect = cfb_fillrect,
|
||||
.fb_copyarea = cfb_copyarea,
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_cursor = lynxfb_ops_cursor,
|
||||
};
|
||||
|
||||
static const struct fb_ops lynxfb_ops_accel = {
|
||||
.owner = THIS_MODULE,
|
||||
__FB_DEFAULT_IOMEM_OPS_RDWR,
|
||||
.fb_check_var = lynxfb_ops_check_var,
|
||||
.fb_set_par = lynxfb_ops_set_par,
|
||||
.fb_setcolreg = lynxfb_ops_setcolreg,
|
||||
@ -698,10 +695,12 @@ static const struct fb_ops lynxfb_ops_accel = {
|
||||
.fb_fillrect = lynxfb_ops_fillrect,
|
||||
.fb_copyarea = lynxfb_ops_copyarea,
|
||||
.fb_imageblit = lynxfb_ops_imageblit,
|
||||
__FB_DEFAULT_IOMEM_OPS_MMAP,
|
||||
};
|
||||
|
||||
static const struct fb_ops lynxfb_ops_accel_with_cursor = {
|
||||
.owner = THIS_MODULE,
|
||||
__FB_DEFAULT_IOMEM_OPS_RDWR,
|
||||
.fb_check_var = lynxfb_ops_check_var,
|
||||
.fb_set_par = lynxfb_ops_set_par,
|
||||
.fb_setcolreg = lynxfb_ops_setcolreg,
|
||||
@ -711,6 +710,7 @@ static const struct fb_ops lynxfb_ops_accel_with_cursor = {
|
||||
.fb_copyarea = lynxfb_ops_copyarea,
|
||||
.fb_imageblit = lynxfb_ops_imageblit,
|
||||
.fb_cursor = lynxfb_ops_cursor,
|
||||
__FB_DEFAULT_IOMEM_OPS_MMAP,
|
||||
};
|
||||
|
||||
static int lynxfb_set_fbinfo(struct fb_info *info, int index)
|
||||
|
Loading…
Reference in New Issue
Block a user