[PATCH 1/2] video: udlfb: Constify read only data

Subsystems: displaylink usb 2.0 framebuffer driver (udlfb), framebuffer layer, the rest

STALE3127d

2 messages, 2 authors, 2018-01-16 · open the first message on its own page

[PATCH 1/2] video: udlfb: Constify read only data

From: Ladislav Michl <hidden>
Date: 2018-01-15 16:59:46

Both dlfb_fix and fb_device_attrs are never written to, so
it is safe to make them const.

Signed-off-by: Ladislav Michl <redacted>
---
 drivers/video/fbdev/udlfb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
index 47e31668f316..f0118c10b4ab 100644
--- a/drivers/video/fbdev/udlfb.c
+++ b/drivers/video/fbdev/udlfb.c
@@ -32,7 +32,7 @@
 #include <video/udlfb.h>
 #include "edid.h"
 
-static struct fb_fix_screeninfo dlfb_fix = {
+static const struct fb_fix_screeninfo dlfb_fix = {
 	.id =           "udlfb",
 	.type =         FB_TYPE_PACKED_PIXELS,
 	.visual =       FB_VISUAL_TRUECOLOR,
@@ -1455,7 +1455,7 @@ static const struct bin_attribute edid_attr = {
 	.write = edid_store
 };
 
-static struct device_attribute fb_device_attrs[] = {
+static const struct device_attribute fb_device_attrs[] = {
 	__ATTR_RO(metrics_bytes_rendered),
 	__ATTR_RO(metrics_bytes_identical),
 	__ATTR_RO(metrics_bytes_sent),
-- 
2.15.1

Re: [PATCH 1/2] video: udlfb: Constify read only data

From: Bartlomiej Zolnierkiewicz <hidden>
Date: 2018-01-16 15:34:24

On Monday, January 15, 2018 05:59:46 PM Ladislav Michl wrote:
Both dlfb_fix and fb_device_attrs are never written to, so
it is safe to make them const.

Signed-off-by: Ladislav Michl <redacted>
Patch queued for 4.16, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help