Blob Blame History Raw
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Date: Mon, 3 Jul 2017 21:53:54 +0530
Subject: drm/atmel-hlcdc : constify drm_plane_helper_funcs and drm_plane_funcs.
Git-commit: d95a8e7b2ac31029fd916711dff3bf9c562da700
Patch-mainline: v4.14-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166

drm_plane_helper_funcs and drm_plane_funcsare not supposed to change
at runtime. All functions working with drm_plane_helper_funcs and
drm_plane_funcs work with const. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
   6072	    596	      0	   6668	   1a0c atmel_hlcdc_plane.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   6218	    436	      0	   6654	   19fe atmel_hlcdc_plane.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/646415a3b2e62182f85254115e8491e5caf4b2c7.1499098826.git.arvind.yadav.cs@gmail.com

Acked-by: Petr Tesarik <ptesarik@suse.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
@@ -940,7 +940,7 @@ void atmel_hlcdc_plane_irq(struct atmel_
 			desc->name);
 }
 
-static struct drm_plane_helper_funcs atmel_hlcdc_layer_plane_helper_funcs = {
+static const struct drm_plane_helper_funcs atmel_hlcdc_layer_plane_helper_funcs = {
 	.atomic_check = atmel_hlcdc_plane_atomic_check,
 	.atomic_update = atmel_hlcdc_plane_atomic_update,
 	.atomic_disable = atmel_hlcdc_plane_atomic_disable,
@@ -1049,7 +1049,7 @@ static void atmel_hlcdc_plane_atomic_des
 	kfree(state);
 }
 
-static struct drm_plane_funcs layer_plane_funcs = {
+static const struct drm_plane_funcs layer_plane_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
 	.set_property = drm_atomic_helper_plane_set_property,