diff options
author | Helge Deller <deller@gmx.de> | 2006-12-08 05:40:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:05 -0500 |
commit | adf6b206546414fd006098d027e81f2b576ea2aa (patch) | |
tree | c1147f1f850e6e0578e62093a1c50f50cd81c307 /include/linux/fb.h | |
parent | 357b819dda03e642f9c2d737596ad6cdc0022c00 (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/linux/fb.h')
-rw-r--r-- | include/linux/fb.h | 6 |
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 */ |
971 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); | 971 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); |
972 | extern void fb_dealloc_cmap(struct fb_cmap *cmap); | 972 | extern void fb_dealloc_cmap(struct fb_cmap *cmap); |
973 | extern int fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to); | 973 | extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to); |
974 | extern int fb_cmap_to_user(struct fb_cmap *from, struct fb_cmap_user *to); | 974 | extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to); |
975 | extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info); | 975 | extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info); |
976 | extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info); | 976 | extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info); |
977 | extern struct fb_cmap *fb_default_cmap(int len); | 977 | extern const struct fb_cmap *fb_default_cmap(int len); |
978 | extern void fb_invert_cmaps(void); | 978 | extern void fb_invert_cmaps(void); |
979 | 979 | ||
980 | struct fb_videomode { | 980 | struct fb_videomode { |