diff options
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.patch | 41 |
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++]; |
