fbdev/leo: 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-10-tzimmermann@suse.de
This commit is contained in:
parent
aee3c3119f
commit
10ff3e6c8d
@ -587,9 +587,7 @@ config FB_P9100
|
||||
config FB_LEO
|
||||
bool "Leo (ZX) support"
|
||||
depends on FB_SBUS
|
||||
select FB_CFB_FILLRECT
|
||||
select FB_CFB_COPYAREA
|
||||
select FB_CFB_IMAGEBLIT
|
||||
select FB_SBUS_HELPERS
|
||||
help
|
||||
This is the frame buffer device driver for the SBUS-based Sun ZX
|
||||
(leo) frame buffer cards.
|
||||
|
@ -30,28 +30,21 @@
|
||||
static int leo_setcolreg(unsigned, unsigned, unsigned, unsigned,
|
||||
unsigned, struct fb_info *);
|
||||
static int leo_blank(int, struct fb_info *);
|
||||
|
||||
static int leo_mmap(struct fb_info *, struct vm_area_struct *);
|
||||
static int leo_ioctl(struct fb_info *, unsigned int, unsigned long);
|
||||
static int leo_pan_display(struct fb_var_screeninfo *, struct fb_info *);
|
||||
|
||||
static int leo_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
|
||||
static int leo_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
|
||||
|
||||
/*
|
||||
* Frame buffer operations
|
||||
*/
|
||||
|
||||
static const struct fb_ops leo_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
FB_DEFAULT_SBUS_OPS(leo),
|
||||
.fb_setcolreg = leo_setcolreg,
|
||||
.fb_blank = leo_blank,
|
||||
.fb_pan_display = leo_pan_display,
|
||||
.fb_fillrect = cfb_fillrect,
|
||||
.fb_copyarea = cfb_copyarea,
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_mmap = leo_mmap,
|
||||
.fb_ioctl = leo_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.fb_compat_ioctl = sbusfb_compat_ioctl,
|
||||
#endif
|
||||
};
|
||||
|
||||
#define LEO_OFF_LC_SS0_KRN 0x00200000UL
|
||||
@ -413,7 +406,7 @@ static struct sbus_mmap_map leo_mmap_map[] = {
|
||||
{ .size = 0 }
|
||||
};
|
||||
|
||||
static int leo_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
static int leo_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
{
|
||||
struct leo_par *par = (struct leo_par *)info->par;
|
||||
|
||||
@ -422,7 +415,7 @@ static int leo_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
par->which_io, vma);
|
||||
}
|
||||
|
||||
static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
|
||||
static int leo_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return sbusfb_ioctl_helper(cmd, arg, info,
|
||||
FBTYPE_SUNLEO, 32, info->fix.smem_len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user