drm: Constify drm_mode_config atomic helper private pointer
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 2 Jan 2017 09:16:13 +0000 (11:16 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 12 Feb 2017 11:05:23 +0000 (12:05 +0100)
The drm_mode_config helper private field points to a structure of
function pointers that don't need to be modified at runtime. Make it
const.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Acked-by: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170102091613.6310-1-laurent.pinchart@ideasonboard.com
drivers/gpu/drm/arm/malidp_drv.c
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/imx/imx-drm-core.c
drivers/gpu/drm/rockchip/rockchip_drm_fb.c
drivers/gpu/drm/virtio/virtgpu_display.c
include/drm/drm_mode_config.h

index 5dfcdb05c96ea1021129f4a4051e9ae2823414ad..a9608a2e5a29896f251523939ac9dfc4da1c2241 100644 (file)
@@ -100,7 +100,7 @@ static void malidp_atomic_commit_tail(struct drm_atomic_state *state)
        drm_atomic_helper_cleanup_planes(drm, state);
 }
 
-static struct drm_mode_config_helper_funcs malidp_mode_config_helpers = {
+static const struct drm_mode_config_helper_funcs malidp_mode_config_helpers = {
        .atomic_commit_tail = malidp_atomic_commit_tail,
 };
 
index ace4485a27f792f65e6a3d211a1ca15fb423d8cd..cceb551c1a21c2708b206002bfc9ef93690e0263 100644 (file)
@@ -1170,7 +1170,7 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_tail);
 static void commit_tail(struct drm_atomic_state *old_state)
 {
        struct drm_device *dev = old_state->dev;
-       struct drm_mode_config_helper_funcs *funcs;
+       const struct drm_mode_config_helper_funcs *funcs;
 
        funcs = dev->mode_config.helper_private;
 
index 65bd8b8a24948a7603ac7efaa9a3fb678bf0a788..45dceb672e2048058884a4754e170161413e10a9 100644 (file)
@@ -138,7 +138,7 @@ static void imx_drm_atomic_commit_tail(struct drm_atomic_state *state)
        drm_atomic_helper_cleanup_planes(dev, state);
 }
 
-static struct drm_mode_config_helper_funcs imx_drm_mode_config_helpers = {
+static const struct drm_mode_config_helper_funcs imx_drm_mode_config_helpers = {
        .atomic_commit_tail = imx_drm_atomic_commit_tail,
 };
 
index d5e1f8627d3864bdc4c0f7fbba869def8bf1fe3d..200b35b6b3896aa30f0a7bc6d25f998c1bc117a7 100644 (file)
@@ -193,7 +193,7 @@ rockchip_atomic_commit_tail(struct drm_atomic_state *state)
        drm_atomic_helper_cleanup_planes(dev, state);
 }
 
-static struct drm_mode_config_helper_funcs rockchip_mode_config_helpers = {
+static const struct drm_mode_config_helper_funcs rockchip_mode_config_helpers = {
        .atomic_commit_tail = rockchip_atomic_commit_tail,
 };
 
index fad5a1cc59037367bca7433fd55fa78d606022a4..d51bd4521f170df0ab60472892fb013ff9989c42 100644 (file)
@@ -347,7 +347,7 @@ static void vgdev_atomic_commit_tail(struct drm_atomic_state *state)
        drm_atomic_helper_cleanup_planes(dev, state);
 }
 
-static struct drm_mode_config_helper_funcs virtio_mode_config_helpers = {
+static const struct drm_mode_config_helper_funcs virtio_mode_config_helpers = {
        .atomic_commit_tail = vgdev_atomic_commit_tail,
 };
 
index 5a29978062d3c6b996e44ca2ae04f6b524bc3d70..6cd541d69c2e280548cd523bd0fd3ba81291c752 100644 (file)
@@ -661,7 +661,7 @@ struct drm_mode_config {
        /* cursor size */
        uint32_t cursor_width, cursor_height;
 
-       struct drm_mode_config_helper_funcs *helper_private;
+       const struct drm_mode_config_helper_funcs *helper_private;
 };
 
 void drm_mode_config_init(struct drm_device *dev);