diff options
| author | Helge Deller <deller@gmx.de> | 2006-12-08 05:40:29 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:06 -0500 |
| commit | 0128beeee8749e3cb01c27ef9d1da217f5d7b3b8 (patch) | |
| tree | ce206dd5f8d32258a5e9ffdb3f1197e210cca7f0 /drivers/video | |
| parent | d95159cf1b12e8e4b169094b35cbd93b887cb939 (diff) | |
[PATCH] constify and annotate __read_mostly in vgacon.c and fbmem.c
- annotate some variables from vgacon.c and fbmem.c as __read_mostly
- move the mask[] array in fb_set_logo_truepalette() into the .rodata section
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
| -rw-r--r-- | drivers/video/console/vgacon.c | 30 | ||||
| -rw-r--r-- | drivers/video/fbmem.c | 14 |
2 files changed, 22 insertions, 22 deletions
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 0a2c10a1ab..4a9bde2c83 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
| @@ -93,27 +93,27 @@ static void vgacon_invert_region(struct vc_data *c, u16 * p, int count); | |||
| 93 | static unsigned long vgacon_uni_pagedir[2]; | 93 | static unsigned long vgacon_uni_pagedir[2]; |
| 94 | 94 | ||
| 95 | /* Description of the hardware situation */ | 95 | /* Description of the hardware situation */ |
| 96 | static unsigned long vga_vram_base; /* Base of video memory */ | 96 | static int vga_init_done __read_mostly; |
| 97 | static unsigned long vga_vram_end; /* End of video memory */ | 97 | static unsigned long vga_vram_base __read_mostly; /* Base of video memory */ |
| 98 | static int vga_vram_size; /* Size of video memory */ | 98 | static unsigned long vga_vram_end __read_mostly; /* End of video memory */ |
| 99 | static u16 vga_video_port_reg; /* Video register select port */ | 99 | static unsigned int vga_vram_size __read_mostly; /* Size of video memory */ |
| 100 | static u16 vga_video_port_val; /* Video register value port */ | 100 | static u16 vga_video_port_reg __read_mostly; /* Video register select port */ |
| 101 | static unsigned int vga_video_num_columns; /* Number of text columns */ | 101 | static u16 vga_video_port_val __read_mostly; /* Video register value port */ |
| 102 | static unsigned int vga_video_num_lines; /* Number of text lines */ | 102 | static unsigned int vga_video_num_columns; /* Number of text columns */ |
| 103 | static int vga_can_do_color = 0; /* Do we support colors? */ | 103 | static unsigned int vga_video_num_lines; /* Number of text lines */ |
| 104 | static unsigned int vga_default_font_height;/* Height of default screen font */ | 104 | static int vga_can_do_color __read_mostly; /* Do we support colors? */ |
| 105 | static unsigned char vga_video_type; /* Card type */ | 105 | static unsigned int vga_default_font_height __read_mostly; /* Height of default screen font */ |
| 106 | static unsigned char vga_hardscroll_enabled; | 106 | static unsigned char vga_video_type __read_mostly; /* Card type */ |
| 107 | static unsigned char vga_hardscroll_user_enable = 1; | 107 | static unsigned char vga_hardscroll_enabled __read_mostly; |
| 108 | static unsigned char vga_hardscroll_user_enable __read_mostly = 1; | ||
| 108 | static unsigned char vga_font_is_default = 1; | 109 | static unsigned char vga_font_is_default = 1; |
| 109 | static int vga_vesa_blanked; | 110 | static int vga_vesa_blanked; |
| 110 | static int vga_palette_blanked; | 111 | static int vga_palette_blanked; |
| 111 | static int vga_is_gfx; | 112 | static int vga_is_gfx; |
| 112 | static int vga_512_chars; | 113 | static int vga_512_chars; |
| 113 | static int vga_video_font_height; | 114 | static int vga_video_font_height; |
| 114 | static int vga_scan_lines; | 115 | static int vga_scan_lines __read_mostly; |
| 115 | static unsigned int vga_rolled_over = 0; | 116 | static unsigned int vga_rolled_over; |
| 116 | static int vga_init_done; | ||
| 117 | 117 | ||
| 118 | static int __init no_scroll(char *str) | 118 | static int __init no_scroll(char *str) |
| 119 | { | 119 | { |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 00a2168797..3cfea315a4 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
| @@ -52,8 +52,8 @@ | |||
| 52 | 52 | ||
| 53 | #define FBPIXMAPSIZE (1024 * 8) | 53 | #define FBPIXMAPSIZE (1024 * 8) |
| 54 | 54 | ||
| 55 | struct fb_info *registered_fb[FB_MAX]; | 55 | struct fb_info *registered_fb[FB_MAX] __read_mostly; |
| 56 | int num_registered_fb; | 56 | int num_registered_fb __read_mostly; |
| 57 | 57 | ||
| 58 | /* | 58 | /* |
| 59 | * Helpers | 59 | * Helpers |
| @@ -202,7 +202,7 @@ static void fb_set_logo_truepalette(struct fb_info *info, | |||
| 202 | const struct linux_logo *logo, | 202 | const struct linux_logo *logo, |
| 203 | u32 *palette) | 203 | u32 *palette) |
| 204 | { | 204 | { |
| 205 | unsigned char mask[9] = { 0,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff }; | 205 | static const unsigned char mask[] = { 0,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff }; |
| 206 | unsigned char redmask, greenmask, bluemask; | 206 | unsigned char redmask, greenmask, bluemask; |
| 207 | int redshift, greenshift, blueshift; | 207 | int redshift, greenshift, blueshift; |
| 208 | int i; | 208 | int i; |
| @@ -317,7 +317,7 @@ static struct logo_data { | |||
| 317 | int needs_truepalette; | 317 | int needs_truepalette; |
| 318 | int needs_cmapreset; | 318 | int needs_cmapreset; |
| 319 | const struct linux_logo *logo; | 319 | const struct linux_logo *logo; |
| 320 | } fb_logo; | 320 | } fb_logo __read_mostly; |
| 321 | 321 | ||
| 322 | static void fb_rotate_logo_ud(const u8 *in, u8 *out, u32 width, u32 height) | 322 | static void fb_rotate_logo_ud(const u8 *in, u8 *out, u32 width, u32 height) |
| 323 | { | 323 | { |
| @@ -1253,7 +1253,7 @@ fb_release(struct inode *inode, struct file *file) | |||
| 1253 | return 0; | 1253 | return 0; |
| 1254 | } | 1254 | } |
| 1255 | 1255 | ||
| 1256 | static struct file_operations fb_fops = { | 1256 | static const struct file_operations fb_fops = { |
| 1257 | .owner = THIS_MODULE, | 1257 | .owner = THIS_MODULE, |
| 1258 | .read = fb_read, | 1258 | .read = fb_read, |
| 1259 | .write = fb_write, | 1259 | .write = fb_write, |
| @@ -1459,8 +1459,8 @@ int fb_new_modelist(struct fb_info *info) | |||
| 1459 | return err; | 1459 | return err; |
| 1460 | } | 1460 | } |
| 1461 | 1461 | ||
| 1462 | static char *video_options[FB_MAX]; | 1462 | static char *video_options[FB_MAX] __read_mostly; |
| 1463 | static int ofonly; | 1463 | static int ofonly __read_mostly; |
| 1464 | 1464 | ||
| 1465 | extern const char *global_mode_option; | 1465 | extern const char *global_mode_option; |
| 1466 | 1466 | ||
