Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265207
| From | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] video: constify geode ops structures |
| Date | 2015-11-08 22:50 +0100 |
| Message-ID | <qsG0y-5Ac-15@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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 */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] video: constify geode ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-08 22:50 +0100
Re: [PATCH] video: constify geode ops structures Dan Carpenter <dan.carpenter@oracle.com> - 2015-11-08 23:20 +0100
Re: [PATCH] video: constify geode ops structures Julia Lawall <julia.lawall@lip6.fr> - 2015-11-08 23:30 +0100
Re: [PATCH] video: constify geode ops structures Dan Carpenter <dan.carpenter@oracle.com> - 2015-11-09 06:50 +0100
Re: [PATCH] video: constify geode ops structures Joe Perches <joe@perches.com> - 2015-11-09 07:10 +0100
Re: [PATCH] video: constify geode ops structures Julia Lawall <julia.lawall@lip6.fr> - 2015-11-09 07:50 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Dan Carpenter <dan.carpenter@oracle.com> - 2015-11-09 14:40 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Julia Lawall <julia.lawall@lip6.fr> - 2015-11-09 19:20 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Joe Perches <joe@perches.com> - 2015-11-09 19:20 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Dan Carpenter <dan.carpenter@oracle.com> - 2015-11-09 15:00 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Julia Lawall <julia.lawall@lip6.fr> - 2015-11-09 16:00 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Dan Carpenter <dan.carpenter@oracle.com> - 2015-11-09 17:40 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Emese Revfy <re.emese@gmail.com> - 2015-11-09 18:10 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Julia Lawall <julia.lawall@lip6.fr> - 2015-11-09 18:50 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Kees Cook <keescook@chromium.org> - 2015-11-09 22:30 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Julia Lawall <julia.lawall@lip6.fr> - 2015-11-09 23:00 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures Kees Cook <keescook@chromium.org> - 2015-11-10 00:40 +0100
Re: [kernel-hardening] Re: [PATCH] video: constify geode ops structures "PaX Team" <pageexec@freemail.hu> - 2015-11-10 02:40 +0100
Re: [PATCH] video: constify geode ops structures Julia Lawall <julia.lawall@lip6.fr> - 2015-11-10 16:50 +0100
Re: [PATCH] video: constify geode ops structures Kees Cook <keescook@chromium.org> - 2015-11-09 22:30 +0100
Re: [PATCH] video: constify geode ops structures Christoph Hellwig <hch@infradead.org> - 2015-11-10 07:40 +0100
Re: [PATCH] video: constify geode ops structures Kees Cook <keescook@chromium.org> - 2015-11-10 21:40 +0100
Re: [PATCH] video: constify geode ops structures Joe Perches <joe@perches.com> - 2015-11-10 21:50 +0100
Re: [PATCH] video: constify geode ops structures Dan Carpenter <dan.carpenter@oracle.com> - 2015-11-10 23:10 +0100
Re: [PATCH] video: constify geode ops structures Joe Perches <joe@perches.com> - 2015-11-10 23:20 +0100
Re: [PATCH] video: constify geode ops structures Dan Carpenter <dan.carpenter@oracle.com> - 2015-11-10 23:40 +0100
Re: [PATCH] video: constify geode ops structures Joe Perches <joe@perches.com> - 2015-11-10 23:50 +0100
csiph-web