All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: sm750fb: Make variable read only after initialization.
@ 2016-10-18 22:06 Elise Lennion
  0 siblings, 0 replies; only message in thread
From: Elise Lennion @ 2016-10-18 22:06 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>
---

 v2: Changed position of __ro_after_init in the same declaration.

 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..9a49907 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 struct fb_ops lynxfb_ops __ro_after_init = {
 	.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] only message in thread

only message in thread, other threads:[~2016-10-18 22:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-18 22:06 [PATCH v2] staging: sm750fb: Make variable read only after initialization 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.