From: Henry N. <hen...@gm...> - 2009-12-02 02:50:25
|
from: Henry Nestler <hen...@gm...> Replace hard coded 0x10 mask for vc_cursor_type with new macro CUR_USE_SW. Signed-off-by: Henry Nestler <hen...@gm...> --- Kernel version 2.6.32-rc8 drivers/char/vt.c | 2 +- drivers/video/console/bitblit.c | 2 +- drivers/video/console/fbcon.c | 2 +- drivers/video/console/fbcon_ccw.c | 2 +- drivers/video/console/fbcon_cw.c | 2 +- drivers/video/console/fbcon_ud.c | 2 +- include/linux/console_struct.h | 1 + 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 0c80c68..f8b0f58 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -566,7 +566,7 @@ static void add_softcursor(struct vc_data *vc) int i = scr_readw((u16 *) vc->vc_pos); u32 type = vc->vc_cursor_type; - if (! (type & 0x10)) return; + if (! (type & CUR_USE_SW)) return; if (softcursor_original != -1) return; softcursor_original = i; i |= ((type >> 8) & 0xff00 ); diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c index 6b7c8fb..5858863 100644 --- a/drivers/video/console/bitblit.c +++ b/drivers/video/console/bitblit.c @@ -241,7 +241,7 @@ static void bit_cursor(struct vc_data *vc, struct fb_info *info, int mode, unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; int w = DIV_ROUND_UP(vc->vc_font.width, 8), c; int y = real_y(ops->p, vc->vc_y); - int attribute, use_sw = (vc->vc_cursor_type & 0x10); + int attribute, use_sw = (vc->vc_cursor_type & CUR_USE_SW); int err = 1; char *src; diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 3681c6a..d1074ec 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -1291,7 +1291,7 @@ static void fbcon_cursor(struct vc_data *vc, int mode) if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1) return; - if (vc->vc_cursor_type & 0x10) + if (vc->vc_cursor_type & CUR_USE_SW) fbcon_del_cursor_timer(info); else fbcon_add_cursor_timer(info); diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c index bdf913e..c6fd4a9 100644 --- a/drivers/video/console/fbcon_ccw.c +++ b/drivers/video/console/fbcon_ccw.c @@ -226,7 +226,7 @@ static void ccw_cursor(struct vc_data *vc, struct fb_info *info, int mode, unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; int w = (vc->vc_font.height + 7) >> 3, c; int y = real_y(ops->p, vc->vc_y); - int attribute, use_sw = (vc->vc_cursor_type & 0x10); + int attribute, use_sw = (vc->vc_cursor_type & CUR_USE_SW); int err = 1, dx, dy; char *src; u32 vyres = GETVYRES(ops->p->scrollmode, info); diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c index a6819b9..00ac747 100644 --- a/drivers/video/console/fbcon_cw.c +++ b/drivers/video/console/fbcon_cw.c @@ -210,7 +210,7 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info, int mode, unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; int w = (vc->vc_font.height + 7) >> 3, c; int y = real_y(ops->p, vc->vc_y); - int attribute, use_sw = (vc->vc_cursor_type & 0x10); + int attribute, use_sw = (vc->vc_cursor_type & CUR_USE_SW); int err = 1, dx, dy; char *src; u32 vxres = GETVXRES(ops->p->scrollmode, info); diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c index d9b5d6e..ee740e1 100644 --- a/drivers/video/console/fbcon_ud.c +++ b/drivers/video/console/fbcon_ud.c @@ -256,7 +256,7 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, int mode, unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; int w = (vc->vc_font.width + 7) >> 3, c; int y = real_y(ops->p, vc->vc_y); - int attribute, use_sw = (vc->vc_cursor_type & 0x10); + int attribute, use_sw = (vc->vc_cursor_type & CUR_USE_SW); int err = 1, dx, dy; char *src; u32 vyres = GETVYRES(ops->p->scrollmode, info); diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index 38fe59d..c12b3b1 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h @@ -129,6 +129,7 @@ extern void vc_SAK(struct work_struct *work); #define CUR_BLOCK 6 #define CUR_HWMASK 0x0f #define CUR_SWMASK 0xfff0 +#define CUR_USE_SW 0x10 #define CUR_DEFAULT CUR_UNDERLINE === |