aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/console/fbcon_ud.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2006-01-09 23:52:56 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:42 -0500
commitb73deed32d08740bdbf5f4aab43d988e4d135d95 (patch)
tree75d78d58fc1a20f6387d1e152bce148398a93836 /drivers/video/console/fbcon_ud.c
parent8416131ded5e491ecc2947d1ffaedf64725bb7a3 (diff)
[PATCH] fbcon: Sanitize fbcon
Do not pass the structure display since fbcon is already keeping the pointer to the current display. Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/console/fbcon_ud.c')
-rw-r--r--drivers/video/console/fbcon_ud.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c
index 9dd059e8b64..f56ed068a5b 100644
--- a/drivers/video/console/fbcon_ud.c
+++ b/drivers/video/console/fbcon_ud.c
@@ -249,20 +249,19 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
249 } 249 }
250} 250}
251 251
252static void ud_cursor(struct vc_data *vc, struct fb_info *info, 252static void ud_cursor(struct vc_data *vc, struct fb_info *info, int mode,
253 struct display *p, int mode, int softback_lines, 253 int softback_lines, int fg, int bg)
254 int fg, int bg)
255{ 254{
256 struct fb_cursor cursor; 255 struct fb_cursor cursor;
257 struct fbcon_ops *ops = (struct fbcon_ops *) info->fbcon_par; 256 struct fbcon_ops *ops = info->fbcon_par;
258 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; 257 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
259 int w = (vc->vc_font.width + 7) >> 3, c; 258 int w = (vc->vc_font.width + 7) >> 3, c;
260 int y = real_y(p, vc->vc_y); 259 int y = real_y(ops->p, vc->vc_y);
261 int attribute, use_sw = (vc->vc_cursor_type & 0x10); 260 int attribute, use_sw = (vc->vc_cursor_type & 0x10);
262 int err = 1, dx, dy; 261 int err = 1, dx, dy;
263 char *src; 262 char *src;
264 u32 vyres = GETVYRES(p->scrollmode, info); 263 u32 vyres = GETVYRES(ops->p->scrollmode, info);
265 u32 vxres = GETVXRES(p->scrollmode, info); 264 u32 vxres = GETVXRES(ops->p->scrollmode, info);
266 265
267 if (!ops->fontbuffer) 266 if (!ops->fontbuffer)
268 return; 267 return;
@@ -334,7 +333,7 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info,
334 } 333 }
335 334
336 if (cursor.set & FB_CUR_SETSIZE || 335 if (cursor.set & FB_CUR_SETSIZE ||
337 vc->vc_cursor_type != p->cursor_shape || 336 vc->vc_cursor_type != ops->p->cursor_shape ||
338 ops->cursor_state.mask == NULL || 337 ops->cursor_state.mask == NULL ||
339 ops->cursor_reset) { 338 ops->cursor_reset) {
340 char *mask = kmalloc(w*vc->vc_font.height, GFP_ATOMIC); 339 char *mask = kmalloc(w*vc->vc_font.height, GFP_ATOMIC);
@@ -347,10 +346,10 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info,
347 kfree(ops->cursor_state.mask); 346 kfree(ops->cursor_state.mask);
348 ops->cursor_state.mask = mask; 347 ops->cursor_state.mask = mask;
349 348
350 p->cursor_shape = vc->vc_cursor_type; 349 ops->p->cursor_shape = vc->vc_cursor_type;
351 cursor.set |= FB_CUR_SETSHAPE; 350 cursor.set |= FB_CUR_SETSHAPE;
352 351
353 switch (p->cursor_shape & CUR_HWMASK) { 352 switch (ops->p->cursor_shape & CUR_HWMASK) {
354 case CUR_NONE: 353 case CUR_NONE:
355 cur_height = 0; 354 cur_height = 0;
356 break; 355 break;