All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: constify geode ops structures
@ 2015-11-08 21:34 ` Julia Lawall
  0 siblings, 0 replies; 64+ messages in thread
From: Julia Lawall @ 2015-11-08 21:34 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard
  Cc: kernel-janitors, Tomi Valkeinen, linux-geode, linux-fbdev, linux-kernel

These geode ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/video/fbdev/geode/display_gx1.c  |    2 +-
 drivers/video/fbdev/geode/display_gx1.h  |    2 +-
 drivers/video/fbdev/geode/geodefb.h      |    4 ++--
 drivers/video/fbdev/geode/video_cs5530.c |    2 +-
 drivers/video/fbdev/geode/video_cs5530.h |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/video/fbdev/geode/display_gx1.c b/drivers/video/fbdev/geode/display_gx1.c
index 926d53e..b383eb9 100644
--- a/drivers/video/fbdev/geode/display_gx1.c
+++ b/drivers/video/fbdev/geode/display_gx1.c
@@ -208,7 +208,7 @@ static void gx1_set_hw_palette_reg(struct fb_info *info, unsigned regno,
 	writel(val, par->dc_regs + DC_PAL_DATA);
 }
 
-struct geode_dc_ops gx1_dc_ops = {
+const struct geode_dc_ops gx1_dc_ops = {
 	.set_mode	 = gx1_set_mode,
 	.set_palette_reg = gx1_set_hw_palette_reg,
 };
diff --git a/drivers/video/fbdev/geode/display_gx1.h b/drivers/video/fbdev/geode/display_gx1.h
index 671c055..e1cc41b 100644
--- a/drivers/video/fbdev/geode/display_gx1.h
+++ b/drivers/video/fbdev/geode/display_gx1.h
@@ -18,7 +18,7 @@
 unsigned gx1_gx_base(void);
 int gx1_frame_buffer_size(void);
 
-extern struct geode_dc_ops gx1_dc_ops;
+extern const struct geode_dc_ops gx1_dc_ops;
 
 /* GX1 configuration I/O registers */
 
diff --git a/drivers/video/fbdev/geode/geodefb.h b/drivers/video/fbdev/geode/geodefb.h
index ae04820..e2e0793 100644
--- a/drivers/video/fbdev/geode/geodefb.h
+++ b/drivers/video/fbdev/geode/geodefb.h
@@ -31,8 +31,8 @@ struct geodefb_par {
 	int panel_y;
 	void __iomem *dc_regs;
 	void __iomem *vid_regs;
-	struct geode_dc_ops  *dc_ops;
-	struct geode_vid_ops *vid_ops;
+	const struct geode_dc_ops  *dc_ops;
+	const struct geode_vid_ops *vid_ops;
 };
 
 #endif /* !__GEODEFB_H__ */
diff --git a/drivers/video/fbdev/geode/video_cs5530.c b/drivers/video/fbdev/geode/video_cs5530.c
index 649c394..8806132 100644
--- a/drivers/video/fbdev/geode/video_cs5530.c
+++ b/drivers/video/fbdev/geode/video_cs5530.c
@@ -186,7 +186,7 @@ static int cs5530_blank_display(struct fb_info *info, int blank_mode)
 	return 0;
 }
 
-struct geode_vid_ops cs5530_vid_ops = {
+const struct geode_vid_ops cs5530_vid_ops = {
 	.set_dclk          = cs5530_set_dclk_frequency,
 	.configure_display = cs5530_configure_display,
 	.blank_display     = cs5530_blank_display,
diff --git a/drivers/video/fbdev/geode/video_cs5530.h b/drivers/video/fbdev/geode/video_cs5530.h
index 56cecca..c843348 100644
--- a/drivers/video/fbdev/geode/video_cs5530.h
+++ b/drivers/video/fbdev/geode/video_cs5530.h
@@ -15,7 +15,7 @@
 #ifndef __VIDEO_CS5530_H__
 #define __VIDEO_CS5530_H__
 
-extern struct geode_vid_ops cs5530_vid_ops;
+extern const struct geode_vid_ops cs5530_vid_ops;
 
 /* CS5530 Video device registers */
 


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

end of thread, other threads:[~2015-11-24 11:28 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-08 21:34 [PATCH] video: constify geode ops structures Julia Lawall
2015-11-08 21:34 ` Julia Lawall
2015-11-08 22:16 ` Dan Carpenter
2015-11-08 22:16   ` Dan Carpenter
2015-11-08 22:24   ` Julia Lawall
2015-11-08 22:24     ` Julia Lawall
2015-11-09  5:42     ` Dan Carpenter
2015-11-09  5:42       ` [kernel-hardening] " Dan Carpenter
2015-11-09  5:42       ` Dan Carpenter
2015-11-09  6:09       ` Joe Perches
2015-11-09  6:09         ` [kernel-hardening] " Joe Perches
2015-11-09  6:09         ` Joe Perches
2015-11-09  6:39       ` Julia Lawall
2015-11-09  6:39         ` [kernel-hardening] " Julia Lawall
2015-11-09  6:39         ` Julia Lawall
2015-11-09 13:30         ` [kernel-hardening] " Dan Carpenter
2015-11-09 13:30           ` Dan Carpenter
2015-11-09 18:12           ` Julia Lawall
2015-11-09 18:12             ` Julia Lawall
2015-11-09 18:19             ` Joe Perches
2015-11-09 18:19               ` Joe Perches
2015-11-09 13:49       ` Dan Carpenter
2015-11-09 13:49         ` Dan Carpenter
2015-11-09 14:50         ` Julia Lawall
2015-11-09 14:50           ` Julia Lawall
2015-11-09 16:39           ` Dan Carpenter
2015-11-09 16:39             ` Dan Carpenter
2015-11-09 17:05           ` Emese Revfy
2015-11-09 17:05             ` Emese Revfy
2015-11-09 17:48             ` Julia Lawall
2015-11-09 17:48               ` Julia Lawall
2015-11-09 21:24               ` Kees Cook
2015-11-09 21:24                 ` Kees Cook
2015-11-09 21:24                 ` Kees Cook
2015-11-09 21:55                 ` Julia Lawall
2015-11-09 21:55                   ` Julia Lawall
2015-11-09 21:55                   ` Julia Lawall
2015-11-09 23:34                   ` Kees Cook
2015-11-09 23:34                     ` Kees Cook
2015-11-09 23:34                     ` Kees Cook
2015-11-10  1:24                     ` PaX Team
2015-11-10  1:24                       ` PaX Team
2015-11-10  1:24                       ` PaX Team
2015-11-10 15:44       ` Julia Lawall
2015-11-10 15:44         ` [kernel-hardening] " Julia Lawall
2015-11-10 15:44         ` Julia Lawall
2015-11-09 21:20   ` Kees Cook
2015-11-09 21:20     ` Kees Cook
2015-11-10  6:38     ` Christoph Hellwig
2015-11-10  6:38       ` Christoph Hellwig
2015-11-10 20:34       ` Kees Cook
2015-11-10 20:34         ` Kees Cook
2015-11-10 20:49         ` Joe Perches
2015-11-10 20:49           ` Joe Perches
2015-11-10 22:02           ` Dan Carpenter
2015-11-10 22:02             ` Dan Carpenter
2015-11-10 22:17             ` Joe Perches
2015-11-10 22:17               ` Joe Perches
2015-11-10 22:34               ` Dan Carpenter
2015-11-10 22:34                 ` Dan Carpenter
2015-11-10 22:39                 ` Joe Perches
2015-11-10 22:39                   ` Joe Perches
2015-11-24 11:28 ` Tomi Valkeinen
2015-11-24 11:28   ` Tomi Valkeinen

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.