aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2016-03-31 04:08:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-30 12:26:55 -0400
commit91e74ca5e7ac4ec6c61b84d6618eb5e401f852f0 (patch)
tree14382b2b319b99bfd6833dbf08ad661e6b2dfb16 /drivers/tty/vt
parent8ede5cce4f0baff77ef63aa3cb3afc65d0317e0b (diff)
tty: vt, use proper type for default colors
Every user of default_red, default_grn, and default_blu treats them as unsigned char. So make it really unsigned char. And indent the initializers and module_param properly. This saves ~ 100 bytes of data. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r--drivers/tty/vt/vt.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 2c71b3bde174..8f9f8ed3ed09 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1043,16 +1043,23 @@ const unsigned char color_table[] = { 0, 4, 2, 6, 1, 5, 3, 7,
1043 8,12,10,14, 9,13,11,15 }; 1043 8,12,10,14, 9,13,11,15 };
1044 1044
1045/* the default colour table, for VGA+ colour systems */ 1045/* the default colour table, for VGA+ colour systems */
1046int default_red[] = {0x00,0xaa,0x00,0xaa,0x00,0xaa,0x00,0xaa, 1046unsigned char default_red[] = {
1047 0x55,0xff,0x55,0xff,0x55,0xff,0x55,0xff}; 1047 0x00, 0xaa, 0x00, 0xaa, 0x00, 0xaa, 0x00, 0xaa,
1048int default_grn[] = {0x00,0x00,0xaa,0x55,0x00,0x00,0xaa,0xaa, 1048 0x55, 0xff, 0x55, 0xff, 0x55, 0xff, 0x55, 0xff
1049 0x55,0x55,0xff,0xff,0x55,0x55,0xff,0xff}; 1049};
1050int default_blu[] = {0x00,0x00,0x00,0x00,0xaa,0xaa,0xaa,0xaa, 1050module_param_array(default_red, byte, NULL, S_IRUGO | S_IWUSR);
1051 0x55,0x55,0x55,0x55,0xff,0xff,0xff,0xff}; 1051
1052 1052unsigned char default_grn[] = {
1053module_param_array(default_red, int, NULL, S_IRUGO | S_IWUSR); 1053 0x00, 0x00, 0xaa, 0x55, 0x00, 0x00, 0xaa, 0xaa,
1054module_param_array(default_grn, int, NULL, S_IRUGO | S_IWUSR); 1054 0x55, 0x55, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff
1055module_param_array(default_blu, int, NULL, S_IRUGO | S_IWUSR); 1055};
1056module_param_array(default_grn, byte, NULL, S_IRUGO | S_IWUSR);
1057
1058unsigned char default_blu[] = {
1059 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa,
1060 0x55, 0x55, 0x55, 0x55, 0xff, 0xff, 0xff, 0xff
1061};
1062module_param_array(default_blu, byte, NULL, S_IRUGO | S_IWUSR);
1056 1063
1057/* 1064/*
1058 * gotoxy() must verify all boundaries, because the arguments 1065 * gotoxy() must verify all boundaries, because the arguments