]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/console/fbcon_cw.c
Merge /pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / video / console / fbcon_cw.c
index 6c6f3b6dd17563b371b3fba56c64c886c5d1de47..c637e6318803796e6b735b2f860227543cd0107d 100644 (file)
@@ -8,7 +8,6 @@
  *  more details.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/fb.h>
@@ -49,9 +48,9 @@ static inline void cw_update_attr(u8 *dst, u8 *src, int attribute,
 static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
                     int sx, int dy, int dx, int height, int width)
 {
-       struct display *p = &fb_display[vc->vc_num];
+       struct fbcon_ops *ops = info->fbcon_par;
        struct fb_copyarea area;
-       u32 vxres = GETVXRES(p->scrollmode, info);
+       u32 vxres = GETVXRES(ops->p->scrollmode, info);
 
        area.sx = vxres - ((sy + height) * vc->vc_font.height);
        area.sy = sx * vc->vc_font.width;
@@ -66,10 +65,10 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
 static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy,
                     int sx, int height, int width)
 {
-       struct display *p = &fb_display[vc->vc_num];
+       struct fbcon_ops *ops = info->fbcon_par;
        struct fb_fillrect region;
        int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
-       u32 vxres = GETVXRES(p->scrollmode, info);
+       u32 vxres = GETVXRES(ops->p->scrollmode, info);
 
        region.color = attr_bgcol_ec(bgshift,vc);
        region.dx = vxres - ((sy + height) * vc->vc_font.height);
@@ -117,7 +116,6 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info,
                      int fg, int bg)
 {
        struct fb_image image;
-       struct display *p = &fb_display[vc->vc_num];
        struct fbcon_ops *ops = info->fbcon_par;
        u32 width = (vc->vc_font.height + 7)/8;
        u32 cellsize = width * vc->vc_font.width;
@@ -127,7 +125,7 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info,
        u32 cnt, pitch, size;
        u32 attribute = get_attribute(info, scr_readw(s));
        u8 *dst, *buf = NULL;
-       u32 vxres = GETVXRES(p->scrollmode, info);
+       u32 vxres = GETVXRES(ops->p->scrollmode, info);
 
        if (!ops->fontbuffer)
                return;
@@ -204,19 +202,18 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
        }
 }
 
-static void cw_cursor(struct vc_data *vc, struct fb_info *info,
-                     struct display *p, int mode, int softback_lines,
-                     int fg, int bg)
+static void cw_cursor(struct vc_data *vc, struct fb_info *info, int mode,
+                     int softback_lines, int fg, int bg)
 {
        struct fb_cursor cursor;
-       struct fbcon_ops *ops = (struct fbcon_ops *) info->fbcon_par;
+       struct fbcon_ops *ops = info->fbcon_par;
        unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
        int w = (vc->vc_font.height + 7) >> 3, c;
-       int y = real_y(p, vc->vc_y);
+       int y = real_y(ops->p, vc->vc_y);
        int attribute, use_sw = (vc->vc_cursor_type & 0x10);
        int err = 1, dx, dy;
        char *src;
-       u32 vxres = GETVXRES(p->scrollmode, info);
+       u32 vxres = GETVXRES(ops->p->scrollmode, info);
 
        if (!ops->fontbuffer)
                return;
@@ -288,7 +285,7 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info,
        }
 
        if (cursor.set & FB_CUR_SETSIZE ||
-           vc->vc_cursor_type != p->cursor_shape ||
+           vc->vc_cursor_type != ops->p->cursor_shape ||
            ops->cursor_state.mask == NULL ||
            ops->cursor_reset) {
                char *tmp, *mask = kmalloc(w*vc->vc_font.width, GFP_ATOMIC);
@@ -308,10 +305,10 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info,
                kfree(ops->cursor_state.mask);
                ops->cursor_state.mask = mask;
 
-               p->cursor_shape = vc->vc_cursor_type;
+               ops->p->cursor_shape = vc->vc_cursor_type;
                cursor.set |= FB_CUR_SETSHAPE;
 
-               switch (p->cursor_shape & CUR_HWMASK) {
+               switch (ops->p->cursor_shape & CUR_HWMASK) {
                case CUR_NONE:
                        cur_height = 0;
                        break;
@@ -378,11 +375,10 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info,
        ops->cursor_reset = 0;
 }
 
-int cw_update_start(struct fb_info *info)
+static int cw_update_start(struct fb_info *info)
 {
        struct fbcon_ops *ops = info->fbcon_par;
-       struct display *p = &fb_display[ops->currcon];
-       u32 vxres = GETVXRES(p->scrollmode, info);
+       u32 vxres = GETVXRES(ops->p->scrollmode, info);
        u32 xoffset;
        int err;