aboutsummaryrefslogtreecommitdiffstats
path: root/tty/vt-clean-up-the-code-use-kernel-library.patch
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2010-06-16 14:01:08 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-16 14:01:08 -0700
commitfb1b8406b362f338a732e27201431ff99c6f00ef (patch)
treed2d3bef1da1cae52f2104c34867dfd4c6c1b5a58 /tty/vt-clean-up-the-code-use-kernel-library.patch
parentbe5c268029c811c4bcd5ecde1ea5a3f9356d3f31 (diff)
downloadpatches-fb1b8406b362f338a732e27201431ff99c6f00ef.tar.gz
lots of stuff
rest of tty bkl removal and some usb and other patches
Diffstat (limited to 'tty/vt-clean-up-the-code-use-kernel-library.patch')
-rw-r--r--tty/vt-clean-up-the-code-use-kernel-library.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/tty/vt-clean-up-the-code-use-kernel-library.patch b/tty/vt-clean-up-the-code-use-kernel-library.patch
new file mode 100644
index 00000000000000..ebdb7353978d2b
--- /dev/null
+++ b/tty/vt-clean-up-the-code-use-kernel-library.patch
@@ -0,0 +1,41 @@
+From andy.shevchenko@gmail.com Wed Jun 16 13:22:07 2010
+From: Andy Shevchenko <andy.shevchenko@gmail.com>
+Date: Tue, 15 Jun 2010 17:24:16 +0300
+Subject: vt: clean up the code - use kernel library
+To: linux-kernel@vger.kernel.org
+Cc: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>, Andrew Morton <akpm@linux-foundation.org>, Greg Kroah-Hartman <gregkh@suse.de>, Alan Cox <alan@linux.intel.com>
+Message-ID: <1276611856-28232-1-git-send-email-andy.shevchenko@gmail.com>
+
+
+From: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
+
+Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/vt.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/char/vt.c
++++ b/drivers/char/vt.c
+@@ -104,6 +104,7 @@
+ #include <linux/io.h>
+ #include <asm/system.h>
+ #include <linux/uaccess.h>
++#include <linux/ctype.h>
+
+ #define MAX_NR_CON_DRIVER 16
+
+@@ -1789,8 +1790,8 @@ static void do_con_trol(struct tty_struc
+ vc->vc_state = ESnormal;
+ return;
+ case ESpalette:
+- if ( (c>='0'&&c<='9') || (c>='A'&&c<='F') || (c>='a'&&c<='f') ) {
+- vc->vc_par[vc->vc_npar++] = (c > '9' ? (c & 0xDF) - 'A' + 10 : c - '0');
++ if (isxdigit(c)) {
++ vc->vc_par[vc->vc_npar++] = hex_to_bin(c);
+ if (vc->vc_npar == 7) {
+ int i = vc->vc_par[0] * 3, j = 1;
+ vc->vc_palette[i] = 16 * vc->vc_par[j++];