linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henry Nestler <henry.nestler@gmail.com>
To: geert@linux-m68k.org
Cc: trivial@kernel.org, linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH 2/4] fbcon: Macro CUR_USE_SW for vc_cursor_type mask 0x10
Date: Wed, 2 Dec 2009 03:50:09 +0100	[thread overview]
Message-ID: <5b77f61c0912011850u71ae35a0p7fc9bdcc06898b4c@mail.gmail.com> (raw)

from: Henry Nestler <henry.nestler@gmail.com>

Replace hard coded 0x10 mask for vc_cursor_type with new macro CUR_USE_SW.

Signed-off-by: Henry Nestler <henry.nestler@gmail.com>
---
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

===

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev

                 reply	other threads:[~2009-12-02  2:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b77f61c0912011850u71ae35a0p7fc9bdcc06898b4c@mail.gmail.com \
    --to=henry.nestler@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).