linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henry Nestler <henry.nestler@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH 1/4] vt: Replace mask 0x0f with macro CUR_HWMASK
Date: Wed, 2 Dec 2009 03:45:20 +0100	[thread overview]
Message-ID: <5b77f61c0912011845o765c6f81sac06e635a79c2d3b@mail.gmail.com> (raw)
In-Reply-To: <5b77f61c0912011837n72bf3e03x7fd9d38c818aa30d@mail.gmail.com>

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

Replace hard coded 0x0f with pre-defined macro CUR_HWMASK
to mask vc_cursor_type, and replace hard coded 1 with CUR_NONE.

Signed-off-by: Henry Nestler <henry.nestler@gmail.com>
---
Kernel version 2.6.32-rc8

 drivers/char/vt.c                       |    2 +-
 drivers/usb/misc/sisusbvga/sisusb_con.c |    2 +-
 drivers/video/console/mdacon.c          |    2 +-
 drivers/video/console/sticon.c          |    2 +-
 drivers/video/console/tileblit.c        |    2 +-
 drivers/video/console/vgacon.c          |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 0c80c68..26cf397 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -606,7 +606,7 @@ static void set_cursor(struct vc_data *vc)
 		if (vc == sel_cons)
 			clear_selection();
 		add_softcursor(vc);
-		if ((vc->vc_cursor_type & 0x0f) != 1)
+		if ((vc->vc_cursor_type & CUR_HWMASK) != CUR_NONE)
 			vc->vc_sw->con_cursor(vc, CM_DRAW);
 	} else
 		hide_cursor(vc);
diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c
b/drivers/usb/misc/sisusbvga/sisusb_con.c
index b624320..7599765 100644
--- a/drivers/usb/misc/sisusbvga/sisusb_con.c
+++ b/drivers/usb/misc/sisusbvga/sisusb_con.c
@@ -806,7 +806,7 @@ sisusbcon_cursor(struct vc_data *c, int mode)

 	baseline = c->vc_font.height - (c->vc_font.height < 10 ? 1 : 2);

-	switch (c->vc_cursor_type & 0x0f) {
+	switch (c->vc_cursor_type & CUR_HWMASK) {
 		case CUR_BLOCK:		from = 1;
 					to   = c->vc_font.height;
 					break;
diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c
index dd3eaaa..688837d 100644
--- a/drivers/video/console/mdacon.c
+++ b/drivers/video/console/mdacon.c
@@ -520,7 +520,7 @@ static void mdacon_cursor(struct vc_data *c, int mode)

 	mda_set_cursor(c->vc_y*mda_num_columns*2 + c->vc_x*2);

-	switch (c->vc_cursor_type & 0x0f) {
+	switch (c->vc_cursor_type & CUR_HWMASK) {

 		case CUR_LOWER_THIRD:	mda_set_cursor_size(10, 13); break;
 		case CUR_LOWER_HALF:	mda_set_cursor_size(7,  13); break;
diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c
index 491c1c1..b7c3262 100644
--- a/drivers/video/console/sticon.c
+++ b/drivers/video/console/sticon.c
@@ -144,7 +144,7 @@ static void sticon_cursor(struct vc_data *conp, int mode)
 	break;
     case CM_MOVE:
     case CM_DRAW:
-	switch (conp->vc_cursor_type & 0x0f) {
+	switch (conp->vc_cursor_type & CUR_HWMASK) {
 	case CUR_UNDERLINE:
 	case CUR_LOWER_THIRD:
 	case CUR_LOWER_HALF:
diff --git a/drivers/video/console/tileblit.c b/drivers/video/console/tileblit.c
index 0056a41..33bb70d 100644
--- a/drivers/video/console/tileblit.c
+++ b/drivers/video/console/tileblit.c
@@ -91,7 +91,7 @@ static void tile_cursor(struct vc_data *vc, struct
fb_info *info, int mode,
 	cursor.fg = fg;
 	cursor.bg = bg;

-	switch (vc->vc_cursor_type & 0x0f) {
+	switch (vc->vc_cursor_type & CUR_HWMASK) {
 	case CUR_NONE:
 		cursor.shape = FB_TILE_CURSOR_NONE;
 		break;
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index da55cca..40bd8f8 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -703,7 +703,7 @@ static void vgacon_cursor(struct vc_data *c, int mode)
 	case CM_MOVE:
 	case CM_DRAW:
 		write_vga(14, (c->vc_pos - vga_vram_base) / 2);
-		switch (c->vc_cursor_type & 0x0f) {
+		switch (c->vc_cursor_type & CUR_HWMASK) {
 		case CUR_UNDERLINE:
 			vgacon_set_cursor_size(c->vc_x,
 					       c->vc_font.height -
===

------------------------------------------------------------------------------
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:45 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <5b77f61c0912011837n72bf3e03x7fd9d38c818aa30d@mail.gmail.com>]

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=5b77f61c0912011845o765c6f81sac06e635a79c2d3b@mail.gmail.com \
    --to=henry.nestler@gmail.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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).