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 143753d..2672dc6 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 090cc0d..ac8a78b 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 1751bb9..fb9bff0 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 b0877b9..647a1fd 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 b4c1cea..1d15560 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 3d10614..481ef97 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 cff198b..db48867 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 f439f0a..0c5cdda 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 58f5394..b06e5cb 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 f4f5117..ec0b7d6 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 02be6c5..521fe42 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 e34325c..9d86081 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 ea29953..c59806d 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,