Merge tag 'drm-misc-next-2023-09-11-1' of git://anongit.freedesktop.org/drm/drm-misc...
[sfrench/cifs-2.6.git] / drivers / video / fbdev / cg6.c
index 8ef6ac9132f3d134591c49fd0a3f6b801a8da360..69d3ce50948de341ff1828a7ea981cf34562fa2e 100644 (file)
@@ -37,16 +37,18 @@ static void cg6_imageblit(struct fb_info *, const struct fb_image *);
 static void cg6_fillrect(struct fb_info *, const struct fb_fillrect *);
 static void cg6_copyarea(struct fb_info *info, const struct fb_copyarea *area);
 static int cg6_sync(struct fb_info *);
-static int cg6_mmap(struct fb_info *, struct vm_area_struct *);
-static int cg6_ioctl(struct fb_info *, unsigned int, unsigned long);
 static int cg6_pan_display(struct fb_var_screeninfo *, struct fb_info *);
 
+static int cg6_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
+static int cg6_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
+
 /*
  *  Frame buffer operations
  */
 
 static const struct fb_ops cg6_ops = {
        .owner                  = THIS_MODULE,
+       __FB_DEFAULT_SBUS_OPS_RDWR(cg6),
        .fb_setcolreg           = cg6_setcolreg,
        .fb_blank               = cg6_blank,
        .fb_pan_display         = cg6_pan_display,
@@ -54,11 +56,8 @@ static const struct fb_ops cg6_ops = {
        .fb_copyarea            = cg6_copyarea,
        .fb_imageblit           = cg6_imageblit,
        .fb_sync                = cg6_sync,
-       .fb_mmap                = cg6_mmap,
-       .fb_ioctl               = cg6_ioctl,
-#ifdef CONFIG_COMPAT
-       .fb_compat_ioctl        = sbusfb_compat_ioctl,
-#endif
+       __FB_DEFAULT_SBUS_OPS_IOCTL(cg6),
+       __FB_DEFAULT_SBUS_OPS_MMAP(cg6),
 };
 
 /* Offset of interesting structures in the OBIO space */
@@ -590,7 +589,7 @@ static struct sbus_mmap_map cg6_mmap_map[] = {
        { .size = 0 }
 };
 
-static int cg6_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int cg6_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
 {
        struct cg6_par *par = (struct cg6_par *)info->par;
 
@@ -599,7 +598,7 @@ static int cg6_mmap(struct fb_info *info, struct vm_area_struct *vma)
                                  par->which_io, vma);
 }
 
-static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
+static int cg6_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
 {
        return sbusfb_ioctl_helper(cmd, arg, info,
                                   FBTYPE_SUNFAST_COLOR, 8, info->fix.smem_len);