diff options
Diffstat (limited to 'drivers/video/console')
-rw-r--r-- | drivers/video/console/softcursor.c | 26 | ||||
-rw-r--r-- | drivers/video/console/sticon.c | 2 | ||||
-rw-r--r-- | drivers/video/console/vgacon.c | 30 |
3 files changed, 29 insertions, 29 deletions
diff --git a/drivers/video/console/softcursor.c b/drivers/video/console/softcursor.c index 7d07d838356..f577bd80e02 100644 --- a/drivers/video/console/softcursor.c +++ b/drivers/video/console/softcursor.c @@ -1,11 +1,13 @@ /* - * linux/drivers/video/softcursor.c -- Generic software cursor for frame buffer devices + * linux/drivers/video/softcursor.c + * + * Generic software cursor for frame buffer devices * * Created 14 Nov 2002 by James Simmons * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. + * This file is subject to the terms and conditions of the GNU General + * Public License. See the file COPYING in the main directory of this + * archive for more details. */ #include <linux/module.h> @@ -25,7 +27,7 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor) unsigned int buf_align = info->pixmap.buf_align - 1; unsigned int i, size, dsize, s_pitch, d_pitch; struct fb_image *image; - u8 *dst; + u8 *src, *dst; if (info->state != FBINFO_STATE_RUNNING) return 0; @@ -45,7 +47,8 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor) } } - image = (struct fb_image *) (ops->cursor_src + dsize); + src = ops->cursor_src + sizeof(struct fb_image); + image = (struct fb_image *)ops->cursor_src; *image = cursor->image; d_pitch = (s_pitch + scan_align) & ~scan_align; @@ -57,21 +60,18 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor) switch (cursor->rop) { case ROP_XOR: for (i = 0; i < dsize; i++) - ops->cursor_src[i] = image->data[i] ^ - cursor->mask[i]; + src[i] = image->data[i] ^ cursor->mask[i]; break; case ROP_COPY: default: for (i = 0; i < dsize; i++) - ops->cursor_src[i] = image->data[i] & - cursor->mask[i]; + src[i] = image->data[i] & cursor->mask[i]; break; } } else - memcpy(ops->cursor_src, image->data, dsize); + memcpy(src, image->data, dsize); - fb_pad_aligned_buffer(dst, d_pitch, ops->cursor_src, s_pitch, - image->height); + fb_pad_aligned_buffer(dst, d_pitch, src, s_pitch, image->height); image->data = dst; info->fbops->fb_imageblit(info, image); return 0; diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 45586aaabd1..57b21e53303 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -345,7 +345,7 @@ static void sticon_save_screen(struct vc_data *conp) { } -static struct consw sti_con = { +static const struct consw sti_con = { .owner = THIS_MODULE, .con_startup = sticon_startup, .con_init = sticon_init, diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 0a2c10a1abf..4a9bde2c839 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); static unsigned long vgacon_uni_pagedir[2]; /* Description of the hardware situation */ -static unsigned long vga_vram_base; /* Base of video memory */ -static unsigned long vga_vram_end; /* End of video memory */ -static int vga_vram_size; /* Size of video memory */ -static u16 vga_video_port_reg; /* Video register select port */ -static u16 vga_video_port_val; /* Video register value port */ -static unsigned int vga_video_num_columns; /* Number of text columns */ -static unsigned int vga_video_num_lines; /* Number of text lines */ -static int vga_can_do_color = 0; /* Do we support colors? */ -static unsigned int vga_default_font_height;/* Height of default screen font */ -static unsigned char vga_video_type; /* Card type */ -static unsigned char vga_hardscroll_enabled; -static unsigned char vga_hardscroll_user_enable = 1; +static int vga_init_done __read_mostly; +static unsigned long vga_vram_base __read_mostly; /* Base of video memory */ +static unsigned long vga_vram_end __read_mostly; /* End of video memory */ +static unsigned int vga_vram_size __read_mostly; /* Size of video memory */ +static u16 vga_video_port_reg __read_mostly; /* Video register select port */ +static u16 vga_video_port_val __read_mostly; /* Video register value port */ +static unsigned int vga_video_num_columns; /* Number of text columns */ +static unsigned int vga_video_num_lines; /* Number of text lines */ +static int vga_can_do_color __read_mostly; /* Do we support colors? */ +static unsigned int vga_default_font_height __read_mostly; /* Height of default screen font */ +static unsigned char vga_video_type __read_mostly; /* Card type */ +static unsigned char vga_hardscroll_enabled __read_mostly; +static unsigned char vga_hardscroll_user_enable __read_mostly = 1; static unsigned char vga_font_is_default = 1; static int vga_vesa_blanked; static int vga_palette_blanked; static int vga_is_gfx; static int vga_512_chars; static int vga_video_font_height; -static int vga_scan_lines; -static unsigned int vga_rolled_over = 0; -static int vga_init_done; +static int vga_scan_lines __read_mostly; +static unsigned int vga_rolled_over; static int __init no_scroll(char *str) { |