Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+14 -14
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
··· 69 69 return 0; 70 70 } 71 71 72 - static struct fb_ops amdgpufb_ops = { 72 + static const struct fb_ops amdgpufb_ops = { 73 73 .owner = THIS_MODULE, 74 74 DRM_FB_HELPER_DEFAULT_OPS, 75 75 .fb_open = amdgpufb_open,
+1 -1
drivers/gpu/drm/armada/armada_fbdev.c
··· 16 16 #include "armada_fb.h" 17 17 #include "armada_gem.h" 18 18 19 - static /*const*/ struct fb_ops armada_fb_ops = { 19 + static const struct fb_ops armada_fb_ops = { 20 20 .owner = THIS_MODULE, 21 21 DRM_FB_HELPER_DEFAULT_OPS, 22 22 .fb_fillrect = drm_fb_helper_cfb_fillrect,
+1 -1
drivers/gpu/drm/drm_fb_helper.c
··· 1997 1997 return -ENODEV; 1998 1998 } 1999 1999 2000 - static struct fb_ops drm_fbdev_fb_ops = { 2000 + static const struct fb_ops drm_fbdev_fb_ops = { 2001 2001 .owner = THIS_MODULE, 2002 2002 DRM_FB_HELPER_DEFAULT_OPS, 2003 2003 .fb_open = drm_fbdev_fb_open,
+1 -1
drivers/gpu/drm/exynos/exynos_drm_fbdev.c
··· 60 60 return 0; 61 61 } 62 62 63 - static struct fb_ops exynos_drm_fb_ops = { 63 + static const struct fb_ops exynos_drm_fb_ops = { 64 64 .owner = THIS_MODULE, 65 65 DRM_FB_HELPER_DEFAULT_OPS, 66 66 .fb_mmap = exynos_drm_fb_mmap,
+1 -1
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
··· 38 38 return ret; 39 39 } 40 40 41 - static struct fb_ops hibmc_drm_fb_ops = { 41 + static const struct fb_ops hibmc_drm_fb_ops = { 42 42 .owner = THIS_MODULE, 43 43 .fb_check_var = drm_fb_helper_check_var, 44 44 .fb_set_par = drm_fb_helper_set_par,
+1 -1
drivers/gpu/drm/i915/display/intel_fbdev.c
··· 100 100 return ret; 101 101 } 102 102 103 - static struct fb_ops intelfb_ops = { 103 + static const struct fb_ops intelfb_ops = { 104 104 .owner = THIS_MODULE, 105 105 DRM_FB_HELPER_DEFAULT_OPS, 106 106 .fb_set_par = intel_fbdev_set_par,
+1 -1
drivers/gpu/drm/msm/msm_fbdev.c
··· 26 26 struct drm_framebuffer *fb; 27 27 }; 28 28 29 - static struct fb_ops msm_fb_ops = { 29 + static const struct fb_ops msm_fb_ops = { 30 30 .owner = THIS_MODULE, 31 31 DRM_FB_HELPER_DEFAULT_OPS, 32 32
+2 -2
drivers/gpu/drm/nouveau/nouveau_fbcon.c
··· 203 203 return 0; 204 204 } 205 205 206 - static struct fb_ops nouveau_fbcon_ops = { 206 + static const struct fb_ops nouveau_fbcon_ops = { 207 207 .owner = THIS_MODULE, 208 208 DRM_FB_HELPER_DEFAULT_OPS, 209 209 .fb_open = nouveau_fbcon_open, ··· 214 214 .fb_sync = nouveau_fbcon_sync, 215 215 }; 216 216 217 - static struct fb_ops nouveau_fbcon_sw_ops = { 217 + static const struct fb_ops nouveau_fbcon_sw_ops = { 218 218 .owner = THIS_MODULE, 219 219 DRM_FB_HELPER_DEFAULT_OPS, 220 220 .fb_open = nouveau_fbcon_open,
+1 -1
drivers/gpu/drm/omapdrm/omap_fbdev.c
··· 70 70 return drm_fb_helper_pan_display(var, fbi); 71 71 } 72 72 73 - static struct fb_ops omap_fb_ops = { 73 + static const struct fb_ops omap_fb_ops = { 74 74 .owner = THIS_MODULE, 75 75 76 76 .fb_check_var = drm_fb_helper_check_var,
+1 -1
drivers/gpu/drm/radeon/radeon_fb.c
··· 73 73 return 0; 74 74 } 75 75 76 - static struct fb_ops radeonfb_ops = { 76 + static const struct fb_ops radeonfb_ops = { 77 77 .owner = THIS_MODULE, 78 78 DRM_FB_HELPER_DEFAULT_OPS, 79 79 .fb_open = radeonfb_open,
+1 -1
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
··· 27 27 return rockchip_gem_mmap_buf(private->fbdev_bo, vma); 28 28 } 29 29 30 - static struct fb_ops rockchip_drm_fbdev_ops = { 30 + static const struct fb_ops rockchip_drm_fbdev_ops = { 31 31 .owner = THIS_MODULE, 32 32 DRM_FB_HELPER_DEFAULT_OPS, 33 33 .fb_mmap = rockchip_fbdev_mmap,
+1 -1
drivers/gpu/drm/tegra/fb.c
··· 192 192 return __tegra_gem_mmap(&bo->gem, vma); 193 193 } 194 194 195 - static struct fb_ops tegra_fb_ops = { 195 + static const struct fb_ops tegra_fb_ops = { 196 196 .owner = THIS_MODULE, 197 197 DRM_FB_HELPER_DEFAULT_OPS, 198 198 .fb_fillrect = drm_fb_helper_sys_fillrect,
+1 -1
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
··· 624 624 } 625 625 626 626 627 - static struct fb_ops vmw_fb_ops = { 627 + static const struct fb_ops vmw_fb_ops = { 628 628 .owner = THIS_MODULE, 629 629 .fb_check_var = vmw_fb_check_var, 630 630 .fb_set_par = vmw_fb_set_par,