summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/cg14.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-08-06 13:58:56 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2023-08-28 09:43:59 +0200
commit1d3bba30ded24c8916fc65cacf5ff16c3d642f81 (patch)
treed99b29fc5de4d17a2ccdbaff409377a89cda469a /drivers/video/fbdev/cg14.c
parent3409343341b10eb99c8bf1eb46a2c49e9cdd786d (diff)
fbdev/cg14: Use initializer macro for struct fb_ops
Initialize struct fb_ops to the correct default values with the macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks to use the infix _sbusfb_. This makes them fit the SBUS helpers' naming pattern. Also make the driver depend on FB_SBUS_HELPERS, which selects the correct modules. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230806120926.5368-6-tzimmermann@suse.de
Diffstat (limited to 'drivers/video/fbdev/cg14.c')
-rw-r--r--drivers/video/fbdev/cg14.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/video/fbdev/cg14.c b/drivers/video/fbdev/cg14.c
index b2ecd9ff2a61..06bdafbeed93 100644
--- a/drivers/video/fbdev/cg14.c
+++ b/drivers/video/fbdev/cg14.c
@@ -30,27 +30,20 @@
static int cg14_setcolreg(unsigned, unsigned, unsigned, unsigned,
unsigned, struct fb_info *);
-
-static int cg14_mmap(struct fb_info *, struct vm_area_struct *);
-static int cg14_ioctl(struct fb_info *, unsigned int, unsigned long);
static int cg14_pan_display(struct fb_var_screeninfo *, struct fb_info *);
+static int cg14_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
+static int cg14_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
+
/*
* Frame buffer operations
*/
static const struct fb_ops cg14_ops = {
.owner = THIS_MODULE,
+ FB_DEFAULT_SBUS_OPS(cg14),
.fb_setcolreg = cg14_setcolreg,
.fb_pan_display = cg14_pan_display,
- .fb_fillrect = cfb_fillrect,
- .fb_copyarea = cfb_copyarea,
- .fb_imageblit = cfb_imageblit,
- .fb_mmap = cg14_mmap,
- .fb_ioctl = cg14_ioctl,
-#ifdef CONFIG_COMPAT
- .fb_compat_ioctl = sbusfb_compat_ioctl,
-#endif
};
#define CG14_MCR_INTENABLE_SHIFT 7
@@ -264,7 +257,7 @@ static int cg14_setcolreg(unsigned regno,
return 0;
}
-static int cg14_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int cg14_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct cg14_par *par = (struct cg14_par *) info->par;
@@ -273,7 +266,7 @@ static int cg14_mmap(struct fb_info *info, struct vm_area_struct *vma)
par->iospace, vma);
}
-static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
+static int cg14_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
struct cg14_par *par = (struct cg14_par *) info->par;
struct cg14_regs __iomem *regs = par->regs;