Commit 75d18496 authored by Jani Nikula's avatar Jani Nikula

media: 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.

Remove the redundant fbops assignments while at it.

v2:
- actually add const in vivid
- fix typo (Christophe de Dinechin)

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: linux-media@vger.kernel.org
Cc: ivtv-devel@ivtvdriver.org
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/71794337f8611271f2c1fdb3882119a58e743a87.1575390741.git.jani.nikula@intel.com
parent 17cfcb68
...@@ -925,7 +925,7 @@ static int ivtvfb_blank(int blank_mode, struct fb_info *info) ...@@ -925,7 +925,7 @@ static int ivtvfb_blank(int blank_mode, struct fb_info *info)
return 0; return 0;
} }
static struct fb_ops ivtvfb_ops = { static const struct fb_ops ivtvfb_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.fb_write = ivtvfb_write, .fb_write = ivtvfb_write,
.fb_check_var = ivtvfb_check_var, .fb_check_var = ivtvfb_check_var,
...@@ -1049,7 +1049,6 @@ static int ivtvfb_init_vidmode(struct ivtv *itv) ...@@ -1049,7 +1049,6 @@ static int ivtvfb_init_vidmode(struct ivtv *itv)
oi->ivtvfb_info.node = -1; oi->ivtvfb_info.node = -1;
oi->ivtvfb_info.flags = FBINFO_FLAG_DEFAULT; oi->ivtvfb_info.flags = FBINFO_FLAG_DEFAULT;
oi->ivtvfb_info.fbops = &ivtvfb_ops;
oi->ivtvfb_info.par = itv; oi->ivtvfb_info.par = itv;
oi->ivtvfb_info.var = oi->ivtvfb_defined; oi->ivtvfb_info.var = oi->ivtvfb_defined;
oi->ivtvfb_info.fix = oi->ivtvfb_fix; oi->ivtvfb_info.fix = oi->ivtvfb_fix;
......
...@@ -244,7 +244,7 @@ static int vivid_fb_blank(int blank_mode, struct fb_info *info) ...@@ -244,7 +244,7 @@ static int vivid_fb_blank(int blank_mode, struct fb_info *info)
return 0; return 0;
} }
static struct fb_ops vivid_fb_ops = { static const struct fb_ops vivid_fb_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.fb_check_var = vivid_fb_check_var, .fb_check_var = vivid_fb_check_var,
.fb_set_par = vivid_fb_set_par, .fb_set_par = vivid_fb_set_par,
...@@ -311,7 +311,6 @@ static int vivid_fb_init_vidmode(struct vivid_dev *dev) ...@@ -311,7 +311,6 @@ static int vivid_fb_init_vidmode(struct vivid_dev *dev)
dev->fb_info.node = -1; dev->fb_info.node = -1;
dev->fb_info.flags = FBINFO_FLAG_DEFAULT; dev->fb_info.flags = FBINFO_FLAG_DEFAULT;
dev->fb_info.fbops = &vivid_fb_ops;
dev->fb_info.par = dev; dev->fb_info.par = dev;
dev->fb_info.var = dev->fb_defined; dev->fb_info.var = dev->fb_defined;
dev->fb_info.fix = dev->fb_fix; dev->fb_info.fix = dev->fb_fix;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment