All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: sm750fb: Make variable read only after initialization.
@ 2016-10-17  2:32 Elise Lennion
  2016-10-17  7:44 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Elise Lennion @ 2016-10-17  2:32 UTC (permalink / raw)
  To: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel

Use __ro_after_init to protect variable, initialized in several steps,
from overwrite during runtime.

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
---
 drivers/staging/sm750fb/sm750.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 0663ec0..5c02ad8 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -719,7 +719,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
 	return ret;
 }
 
-static struct fb_ops lynxfb_ops = {
+static __ro_after_init struct fb_ops lynxfb_ops = {
 	.owner = THIS_MODULE,
 	.fb_check_var =  lynxfb_ops_check_var,
 	.fb_set_par = lynxfb_ops_set_par,
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-20 23:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-17  2:32 [PATCH] staging: sm750fb: Make variable read only after initialization Elise Lennion
2016-10-17  7:44 ` Greg KH
2016-10-18 21:46   ` Elise Lennion
2016-10-19  6:00     ` [Outreachy kernel] " Julia Lawall
2016-10-19  6:48       ` Greg KH
2016-10-20 23:23         ` Elise Lennion

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.