mirror of https://gitee.com/openkylin/linux.git
drm: 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. Cc: dri-devel@lists.freedesktop.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/59b43629ac60031c5bbf961d8c49695019bc9c6f.1575390740.git.jani.nikula@intel.com
This commit is contained in:
parent
bf9e25ec12
commit
b6ff753a0c
|
@ -69,7 +69,7 @@ amdgpufb_release(struct fb_info *info, int user)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct fb_ops amdgpufb_ops = {
|
||||
static const struct fb_ops amdgpufb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
.fb_open = amdgpufb_open,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "armada_fb.h"
|
||||
#include "armada_gem.h"
|
||||
|
||||
static /*const*/ struct fb_ops armada_fb_ops = {
|
||||
static const struct fb_ops armada_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
.fb_fillrect = drm_fb_helper_cfb_fillrect,
|
||||
|
|
|
@ -1997,7 +1997,7 @@ static int drm_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static struct fb_ops drm_fbdev_fb_ops = {
|
||||
static const struct fb_ops drm_fbdev_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
.fb_open = drm_fbdev_fb_open,
|
||||
|
|
|
@ -60,7 +60,7 @@ static int exynos_drm_fb_mmap(struct fb_info *info,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct fb_ops exynos_drm_fb_ops = {
|
||||
static const struct fb_ops exynos_drm_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
.fb_mmap = exynos_drm_fb_mmap,
|
||||
|
|
|
@ -38,7 +38,7 @@ static int hibmcfb_create_object(
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct fb_ops hibmc_drm_fb_ops = {
|
||||
static const struct fb_ops hibmc_drm_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.fb_check_var = drm_fb_helper_check_var,
|
||||
.fb_set_par = drm_fb_helper_set_par,
|
||||
|
|
|
@ -100,7 +100,7 @@ static int intel_fbdev_pan_display(struct fb_var_screeninfo *var,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct fb_ops intelfb_ops = {
|
||||
static const struct fb_ops intelfb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
.fb_set_par = intel_fbdev_set_par,
|
||||
|
|
|
@ -26,7 +26,7 @@ struct msm_fbdev {
|
|||
struct drm_framebuffer *fb;
|
||||
};
|
||||
|
||||
static struct fb_ops msm_fb_ops = {
|
||||
static const struct fb_ops msm_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ nouveau_fbcon_release(struct fb_info *info, int user)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct fb_ops nouveau_fbcon_ops = {
|
||||
static const struct fb_ops nouveau_fbcon_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
.fb_open = nouveau_fbcon_open,
|
||||
|
@ -214,7 +214,7 @@ static struct fb_ops nouveau_fbcon_ops = {
|
|||
.fb_sync = nouveau_fbcon_sync,
|
||||
};
|
||||
|
||||
static struct fb_ops nouveau_fbcon_sw_ops = {
|
||||
static const struct fb_ops nouveau_fbcon_sw_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
.fb_open = nouveau_fbcon_open,
|
||||
|
|
|
@ -70,7 +70,7 @@ static int omap_fbdev_pan_display(struct fb_var_screeninfo *var,
|
|||
return drm_fb_helper_pan_display(var, fbi);
|
||||
}
|
||||
|
||||
static struct fb_ops omap_fb_ops = {
|
||||
static const struct fb_ops omap_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
|
||||
.fb_check_var = drm_fb_helper_check_var,
|
||||
|
|
|
@ -73,7 +73,7 @@ radeonfb_release(struct fb_info *info, int user)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct fb_ops radeonfb_ops = {
|
||||
static const struct fb_ops radeonfb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
.fb_open = radeonfb_open,
|
||||
|
|
|
@ -27,7 +27,7 @@ static int rockchip_fbdev_mmap(struct fb_info *info,
|
|||
return rockchip_gem_mmap_buf(private->fbdev_bo, vma);
|
||||
}
|
||||
|
||||
static struct fb_ops rockchip_drm_fbdev_ops = {
|
||||
static const struct fb_ops rockchip_drm_fbdev_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
.fb_mmap = rockchip_fbdev_mmap,
|
||||
|
|
|
@ -192,7 +192,7 @@ static int tegra_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
|||
return __tegra_gem_mmap(&bo->gem, vma);
|
||||
}
|
||||
|
||||
static struct fb_ops tegra_fb_ops = {
|
||||
static const struct fb_ops tegra_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
DRM_FB_HELPER_DEFAULT_OPS,
|
||||
.fb_fillrect = drm_fb_helper_sys_fillrect,
|
||||
|
|
|
@ -624,7 +624,7 @@ static int vmw_fb_set_par(struct fb_info *info)
|
|||
}
|
||||
|
||||
|
||||
static struct fb_ops vmw_fb_ops = {
|
||||
static const struct fb_ops vmw_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.fb_check_var = vmw_fb_check_var,
|
||||
.fb_set_par = vmw_fb_set_par,
|
||||
|
|
Loading…
Reference in New Issue