diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-06-24 21:59:42 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-06-25 14:40:01 +0200 |
commit | b65bd7874bc7dc709645fd8acb53603b73ae950a (patch) | |
tree | 620e4c4a77e80b731376f7164fb7b932ab101e7e /include/video/mmp_disp.h | |
parent | c260bda655993bf72d3f9a6df9e9021c3c1cd1be (diff) | |
download | lwn-b65bd7874bc7dc709645fd8acb53603b73ae950a.tar.gz lwn-b65bd7874bc7dc709645fd8acb53603b73ae950a.zip |
fbdev: mmp: Constify struct mmp_overlay_ops
'struct mmp_overlay_ops' is not modified in this driver.
Constifying this structure moves some data to a read-only section, so
increase overall security.
On a x86_64, with allmodconfig, as an example:
Before:
======
text data bss dec hex filename
11798 555 16 12369 3051 drivers/video/fbdev/mmp/hw/mmp_ctrl.o
After:
=====
text data bss dec hex filename
11834 507 16 12357 3045 drivers/video/fbdev/mmp/hw/mmp_ctrl.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'include/video/mmp_disp.h')
-rw-r--r-- | include/video/mmp_disp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/video/mmp_disp.h b/include/video/mmp_disp.h index a722dcbf5073..41354bd49895 100644 --- a/include/video/mmp_disp.h +++ b/include/video/mmp_disp.h @@ -156,7 +156,7 @@ struct mmp_overlay { int status; struct mutex access_ok; - struct mmp_overlay_ops *ops; + const struct mmp_overlay_ops *ops; }; /* panel type */ @@ -299,7 +299,7 @@ struct mmp_path_info { int overlay_num; void (*set_mode)(struct mmp_path *path, struct mmp_mode *mode); void (*set_onoff)(struct mmp_path *path, int status); - struct mmp_overlay_ops *overlay_ops; + const struct mmp_overlay_ops *overlay_ops; void *plat_data; }; |