aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2006-12-08 05:40:27 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:05 -0500
commitadf6b206546414fd006098d027e81f2b576ea2aa (patch)
treec1147f1f850e6e0578e62093a1c50f50cd81c307 /include
parent357b819dda03e642f9c2d737596ad6cdc0022c00 (diff)
[PATCH] fbcmap.c: mark structs const or __read_mostly
- Mark the default colormaps read-only, as nobody should be allowed to modify them - Additionally mark color values as __read_mostly since they will only be modified (very seldom) by fb_invert_cmaps() - Add named C99-initializers in fb_cmap structs and use the ARRAY_SIZE() macro Signed-off-by: Helge Deller <deller@gmx.de> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fb.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index fa23e0671bb3..6fe56aaa6685 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -970,11 +970,11 @@ extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs,
970/* drivers/video/fbcmap.c */ 970/* drivers/video/fbcmap.c */
971extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); 971extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
972extern void fb_dealloc_cmap(struct fb_cmap *cmap); 972extern void fb_dealloc_cmap(struct fb_cmap *cmap);
973extern int fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to); 973extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to);
974extern int fb_cmap_to_user(struct fb_cmap *from, struct fb_cmap_user *to); 974extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to);
975extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info); 975extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info);
976extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info); 976extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info);
977extern struct fb_cmap *fb_default_cmap(int len); 977extern const struct fb_cmap *fb_default_cmap(int len);
978extern void fb_invert_cmaps(void); 978extern void fb_invert_cmaps(void);
979 979
980struct fb_videomode { 980struct fb_videomode {