drm: constify fb ops across all drivers
authorJani Nikula <jani.nikula@intel.com>
Tue, 3 Dec 2019 16:38:48 +0000 (18:38 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 5 Dec 2019 08:57:42 +0000 (10:57 +0200)
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
13 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
drivers/gpu/drm/armada/armada_fbdev.c
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/exynos/exynos_drm_fbdev.c
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
drivers/gpu/drm/i915/display/intel_fbdev.c
drivers/gpu/drm/msm/msm_fbdev.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/omapdrm/omap_fbdev.c
drivers/gpu/drm/radeon/radeon_fb.c
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
drivers/gpu/drm/tegra/fb.c
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c

index 143753d237e7c697d51259724259177fe293a2cf..2672dc64a3101a220e4e8b2cf4d1f6dbf3901b95 100644 (file)
@@ -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,
index 090cc0d699aef06caa9362367555f5720a7be45f..ac8a78bfda032006ba0731bb69b2b8bdb96c5720 100644 (file)
@@ -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,
index 1751bb9ee8d8b9586d9d5aa29aa929589ef1f65e..fb9bff0f45819467a6ea372f52a81ae77ee4daca 100644 (file)
@@ -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,
index b0877b97291c543fb68a2fd2f5da35e15473f5ac..647a1fd1d815b6135253caa3c70c5fbb15489cf0 100644 (file)
@@ -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,
index b4c1cea051e8fd848d02e03a4dcbdf4ce409cf05..1d15560ccb6e67d56a4948a84b6d3ea80035d6b4 100644 (file)
@@ -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,
index 3d1061470e761365c69a2acf2de4cef38b672b60..481ef97c8af188b2c97046f40eccc1ce179df64b 100644 (file)
@@ -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,
index cff198b2f47001453177184316b65d5f19f62c2c..db48867df47dd2a785b273bc4ead0b7aa7ec7ec5 100644 (file)
@@ -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,
 
index f439f0a5b43a5a619550fa6977efd340c05bafba..0c5cdda3c336508eb74aba563decad1db63f9b84 100644 (file)
@@ -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,
index 58f53946ee4d42e5334e826ee08d40b293dbaeb9..b06e5cbfd03afcef4a9f0e74a329490efcdf03dc 100644 (file)
@@ -70,7 +70,7 @@ fallback:
        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,
index f4f511796c40f33ac049477e01353eab9ed0b94e..ec0b7d6c994dc63bb69405c8fea0a2b2f6783410 100644 (file)
@@ -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,
index 02be6c5ff8573301a6fc87676a6d2ddb5dd68f26..521fe42ac5e258560eeefcda9231f5a2af294187 100644 (file)
@@ -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,
index e34325c83d28e22d69040062cf849cbff345842c..9d86081bf6c898100142edb9d55c09d42f28ea68 100644 (file)
@@ -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,
index ea29953e0b081e32855c94499c8caf3316eb2bef..c59806d40e15bc2df5814b49566da3c2b6dcbb96 100644 (file)
@@ -624,7 +624,7 @@ out_unlock:
 }
 
 
-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,