drm/sun4i: constify drm_plane_helper_funcs
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 3 Jul 2017 16:05:20 +0000 (21:35 +0530)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 17 Jul 2017 06:21:33 +0000 (08:21 +0200)
drm_plane_helper_funcs are not supposed to change at runtime.
All functions working with drm_plane_helper_funcs provided by
<drm/drm_plane_helper.h> work with const drm_plane_helper_funcs.
So mark the non-const structs as const.

File size before:
   text    data     bss     dec     hex filename
    981      40       0    1021     3fd drivers/gpu/drm/sun4i/sun4i_layer.o

File size After adding 'const':
   text    data     bss     dec     hex filename
   1021       0       0    1021     3fd drivers/gpu/drm/sun4i/sun4i_layer.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/gpu/drm/sun4i/sun4i_layer.c

index ead4f9d4c1eeddf580bde0beadcd0c7e7a480dc7..6a887ac28aae26e63f04f5c122a75c7c50059e3a 100644 (file)
@@ -52,7 +52,7 @@ static void sun4i_backend_layer_atomic_update(struct drm_plane *plane,
        sun4i_backend_layer_enable(backend, layer->id, true);
 }
 
-static struct drm_plane_helper_funcs sun4i_backend_layer_helper_funcs = {
+static const struct drm_plane_helper_funcs sun4i_backend_layer_helper_funcs = {
        .atomic_check   = sun4i_backend_layer_atomic_check,
        .atomic_disable = sun4i_backend_layer_atomic_disable,
        .atomic_update  = sun4i_backend_layer_atomic_update,