diff options
author | Jani Nikula <jani.nikula@intel.com> | 2019-12-03 18:38:50 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2019-12-05 10:57:53 +0200 |
commit | 8a48ac339398f21282985bff16552447d41dcfb2 (patch) | |
tree | 6119e9d2edf8d42b5b96974f42a0cdb2f4d07af8 /drivers/video/fbdev | |
parent | 28318ac1742ab17eb8ba1c1be0dea4cc14b5b2ea (diff) |
video: constify fb ops across all drivers
Now that the fbops member of struct fb_info is const, we can start
making the ops const as well.
This does not cover all drivers; some actually modify the fbops struct,
for example to adjust for different configurations, and others do more
involved things that I'd rather not touch in practically obsolete
drivers. Mostly this is the low hanging fruit where we can add "const"
and be done with it.
v3:
- un-constify atyfb, mb862xx, nvidia and uvesabf (0day)
v2:
- fix typo (Christophe de Dinechin)
- use "static const" instead of "const static" in mx3fb.c
- also constify smscufx.c
Cc: linux-fbdev@vger.kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ce67f14435f3af498f2e8bf35ce4be11f7504132.1575390740.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/video/fbdev')
107 files changed, 111 insertions, 110 deletions
diff --git a/drivers/video/fbdev/68328fb.c b/drivers/video/fbdev/68328fb.c index d48e96088f76..491fd5a82993 100644 --- a/drivers/video/fbdev/68328fb.c +++ b/drivers/video/fbdev/68328fb.c @@ -96,7 +96,7 @@ static int mc68x328fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma); -static struct fb_ops mc68x328fb_ops = { +static const struct fb_ops mc68x328fb_ops = { .fb_check_var = mc68x328fb_check_var, .fb_set_par = mc68x328fb_set_par, .fb_setcolreg = mc68x328fb_setcolreg, diff --git a/drivers/video/fbdev/acornfb.c b/drivers/video/fbdev/acornfb.c index 7cacae5a8797..a3af49529173 100644 --- a/drivers/video/fbdev/acornfb.c +++ b/drivers/video/fbdev/acornfb.c @@ -604,7 +604,7 @@ acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) return 0; } -static struct fb_ops acornfb_ops = { +static const struct fb_ops acornfb_ops = { .owner = THIS_MODULE, .fb_check_var = acornfb_check_var, .fb_set_par = acornfb_set_par, diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index 7de43be6ef2c..c3d55fc6c4e0 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -423,7 +423,7 @@ static int clcdfb_mmap(struct fb_info *info, return ret; } -static struct fb_ops clcdfb_ops = { +static const struct fb_ops clcdfb_ops = { .owner = THIS_MODULE, .fb_check_var = clcdfb_check_var, .fb_set_par = clcdfb_set_par, diff --git a/drivers/video/fbdev/amifb.c b/drivers/video/fbdev/amifb.c index 91ddc9602014..20e03e00b66d 100644 --- a/drivers/video/fbdev/amifb.c +++ b/drivers/video/fbdev/amifb.c @@ -3493,7 +3493,7 @@ static irqreturn_t amifb_interrupt(int irq, void *dev_id) } -static struct fb_ops amifb_ops = { +static const struct fb_ops amifb_ops = { .owner = THIS_MODULE, .fb_check_var = amifb_check_var, .fb_set_par = amifb_set_par, diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c index a48741aab240..314ab82e01c0 100644 --- a/drivers/video/fbdev/arcfb.c +++ b/drivers/video/fbdev/arcfb.c @@ -491,7 +491,7 @@ static ssize_t arcfb_write(struct fb_info *info, const char __user *buf, return err; } -static struct fb_ops arcfb_ops = { +static const struct fb_ops arcfb_ops = { .owner = THIS_MODULE, .fb_open = arcfb_open, .fb_read = fb_sys_read, diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c index f940e8b66b85..11ab9a153860 100644 --- a/drivers/video/fbdev/arkfb.c +++ b/drivers/video/fbdev/arkfb.c @@ -917,7 +917,7 @@ static int arkfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info /* Frame buffer operations */ -static struct fb_ops arkfb_ops = { +static const struct fb_ops arkfb_ops = { .owner = THIS_MODULE, .fb_open = arkfb_open, .fb_release = arkfb_release, diff --git a/drivers/video/fbdev/asiliantfb.c b/drivers/video/fbdev/asiliantfb.c index ea31054a28ca..3e006da47752 100644 --- a/drivers/video/fbdev/asiliantfb.c +++ b/drivers/video/fbdev/asiliantfb.c @@ -95,7 +95,7 @@ static int asiliantfb_set_par(struct fb_info *info); static int asiliantfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, u_int transp, struct fb_info *info); -static struct fb_ops asiliantfb_ops = { +static const struct fb_ops asiliantfb_ops = { .owner = THIS_MODULE, .fb_check_var = asiliantfb_check_var, .fb_set_par = asiliantfb_set_par, diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c index 5ff8e0320d95..d567f5d56c13 100644 --- a/drivers/video/fbdev/atmel_lcdfb.c +++ b/drivers/video/fbdev/atmel_lcdfb.c @@ -824,7 +824,7 @@ static int atmel_lcdfb_blank(int blank_mode, struct fb_info *info) return ((blank_mode == FB_BLANK_NORMAL) ? 1 : 0); } -static struct fb_ops atmel_lcdfb_ops = { +static const struct fb_ops atmel_lcdfb_ops = { .owner = THIS_MODULE, .fb_check_var = atmel_lcdfb_check_var, .fb_set_par = atmel_lcdfb_set_par, diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c index fc1e45d44719..d7e41c8dd533 100644 --- a/drivers/video/fbdev/aty/aty128fb.c +++ b/drivers/video/fbdev/aty/aty128fb.c @@ -509,7 +509,7 @@ static void aty128_bl_set_power(struct fb_info *info, int power); (readb(bios + (v) + 3) << 24)) -static struct fb_ops aty128fb_ops = { +static const struct fb_ops aty128fb_ops = { .owner = THIS_MODULE, .fb_check_var = aty128fb_check_var, .fb_set_par = aty128fb_set_par, diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 4ca07866f2f6..3af00e3b965e 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -1965,7 +1965,7 @@ static int radeonfb_set_par(struct fb_info *info) } -static struct fb_ops radeonfb_ops = { +static const struct fb_ops radeonfb_ops = { .owner = THIS_MODULE, .fb_check_var = radeonfb_check_var, .fb_set_par = radeonfb_set_par, diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c index 99941ae1f3a1..37a6512feda0 100644 --- a/drivers/video/fbdev/au1100fb.c +++ b/drivers/video/fbdev/au1100fb.c @@ -348,7 +348,7 @@ int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) fbdev->fb_len); } -static struct fb_ops au1100fb_ops = +static const struct fb_ops au1100fb_ops = { .owner = THIS_MODULE, .fb_setcolreg = au1100fb_fb_setcolreg, diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index 265d3b45efd0..c00e01a17368 100644 --- a/drivers/video/fbdev/au1200fb.c +++ b/drivers/video/fbdev/au1200fb.c @@ -1483,7 +1483,7 @@ static int au1200fb_ioctl(struct fb_info *info, unsigned int cmd, } -static struct fb_ops au1200fb_fb_ops = { +static const struct fb_ops au1200fb_fb_ops = { .owner = THIS_MODULE, .fb_check_var = au1200fb_fb_check_var, .fb_set_par = au1200fb_fb_set_par, diff --git a/drivers/video/fbdev/broadsheetfb.c b/drivers/video/fbdev/broadsheetfb.c index d6ba348deb9f..fd66f4d4a621 100644 --- a/drivers/video/fbdev/broadsheetfb.c +++ b/drivers/video/fbdev/broadsheetfb.c @@ -1048,7 +1048,7 @@ static ssize_t broadsheetfb_write(struct fb_info *info, const char __user *buf, return (err) ? err : count; } -static struct fb_ops broadsheetfb_ops = { +static const struct fb_ops broadsheetfb_ops = { .owner = THIS_MODULE, .fb_read = fb_sys_read, .fb_write = broadsheetfb_write, diff --git a/drivers/video/fbdev/bw2.c b/drivers/video/fbdev/bw2.c index 436f10f3d375..0d9a6bb57a09 100644 --- a/drivers/video/fbdev/bw2.c +++ b/drivers/video/fbdev/bw2.c @@ -37,7 +37,7 @@ static int bw2_ioctl(struct fb_info *, unsigned int, unsigned long); * Frame buffer operations */ -static struct fb_ops bw2_ops = { +static const struct fb_ops bw2_ops = { .owner = THIS_MODULE, .fb_blank = bw2_blank, .fb_fillrect = cfb_fillrect, diff --git a/drivers/video/fbdev/carminefb.c b/drivers/video/fbdev/carminefb.c index 9f3be0258623..bf3f2a9598b1 100644 --- a/drivers/video/fbdev/carminefb.c +++ b/drivers/video/fbdev/carminefb.c @@ -527,7 +527,7 @@ static int init_hardware(struct carmine_hw *hw) return 0; } -static struct fb_ops carminefb_ops = { +static const st |