Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: constify geode ops structures

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>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Julia Lawall and committed by
Tomi Valkeinen
16379ad8 814740e7

+6 -6
+1 -1
drivers/video/fbdev/geode/display_gx1.c
··· 208 208 writel(val, par->dc_regs + DC_PAL_DATA); 209 209 } 210 210 211 - struct geode_dc_ops gx1_dc_ops = { 211 + const struct geode_dc_ops gx1_dc_ops = { 212 212 .set_mode = gx1_set_mode, 213 213 .set_palette_reg = gx1_set_hw_palette_reg, 214 214 };
+1 -1
drivers/video/fbdev/geode/display_gx1.h
··· 18 18 unsigned gx1_gx_base(void); 19 19 int gx1_frame_buffer_size(void); 20 20 21 - extern struct geode_dc_ops gx1_dc_ops; 21 + extern const struct geode_dc_ops gx1_dc_ops; 22 22 23 23 /* GX1 configuration I/O registers */ 24 24
+2 -2
drivers/video/fbdev/geode/geodefb.h
··· 31 31 int panel_y; 32 32 void __iomem *dc_regs; 33 33 void __iomem *vid_regs; 34 - struct geode_dc_ops *dc_ops; 35 - struct geode_vid_ops *vid_ops; 34 + const struct geode_dc_ops *dc_ops; 35 + const struct geode_vid_ops *vid_ops; 36 36 }; 37 37 38 38 #endif /* !__GEODEFB_H__ */
+1 -1
drivers/video/fbdev/geode/video_cs5530.c
··· 186 186 return 0; 187 187 } 188 188 189 - struct geode_vid_ops cs5530_vid_ops = { 189 + const struct geode_vid_ops cs5530_vid_ops = { 190 190 .set_dclk = cs5530_set_dclk_frequency, 191 191 .configure_display = cs5530_configure_display, 192 192 .blank_display = cs5530_blank_display,
+1 -1
drivers/video/fbdev/geode/video_cs5530.h
··· 15 15 #ifndef __VIDEO_CS5530_H__ 16 16 #define __VIDEO_CS5530_H__ 17 17 18 - extern struct geode_vid_ops cs5530_vid_ops; 18 + extern const struct geode_vid_ops cs5530_vid_ops; 19 19 20 20 /* CS5530 Video device registers */ 21 21