diff options
author | Jiri Slaby <jslaby@suse.cz> | 2016-03-31 04:08:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-30 12:26:55 -0400 |
commit | 8ede5cce4f0baff77ef63aa3cb3afc65d0317e0b (patch) | |
tree | c4b95d5974701687e308d6a81816bad172c23a85 /drivers | |
parent | 34902b7f2754e6d890feb0cee34187f1bc75c930 (diff) |
tty: vt, make color_table const
This means all ->con_set_palette have to have the second parameter
const too now.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/vt/vt.c | 2 | ||||
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb_con.c | 2 | ||||
-rw-r--r-- | drivers/video/console/fbcon.c | 4 | ||||
-rw-r--r-- | drivers/video/console/mdacon.c | 2 | ||||
-rw-r--r-- | drivers/video/console/newport_con.c | 2 | ||||
-rw-r--r-- | drivers/video/console/sticon.c | 2 | ||||
-rw-r--r-- | drivers/video/console/vgacon.c | 5 |
7 files changed, 9 insertions, 10 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index d1da391febb4..2c71b3bde174 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c | |||
@@ -1039,7 +1039,7 @@ struct vc_data *vc_deallocate(unsigned int currcons) | |||
1039 | #define VT100ID "\033[?1;2c" | 1039 | #define VT100ID "\033[?1;2c" |
1040 | #define VT102ID "\033[?6c" | 1040 | #define VT102ID "\033[?6c" |
1041 | 1041 | ||
1042 | unsigned char color_table[] = { 0, 4, 2, 6, 1, 5, 3, 7, | 1042 | 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 */ |
diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index ace343088915..afa853209f1d 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c | |||
@@ -601,7 +601,7 @@ sisusbcon_save_screen(struct vc_data *c) | |||
601 | 601 | ||
602 | /* interface routine */ | 602 | /* interface routine */ |
603 | static int | 603 | static int |
604 | sisusbcon_set_palette(struct vc_data *c, unsigned char *table) | 604 | sisusbcon_set_palette(struct vc_data *c, const unsigned char *table) |
605 | { | 605 | { |
606 | struct sisusb_usb_data *sisusb; | 606 | struct sisusb_usb_data *sisusb; |
607 | int i, j; | 607 | int i, j; |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 6e92917ba77a..afd3301ac40c 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -170,7 +170,7 @@ static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, | |||
170 | int height, int width); | 170 | int height, int width); |
171 | static int fbcon_switch(struct vc_data *vc); | 171 | static int fbcon_switch(struct vc_data *vc); |
172 | static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch); | 172 | static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch); |
173 | static int fbcon_set_palette(struct vc_data *vc, unsigned char *table); | 173 | static int fbcon_set_palette(struct vc_data *vc, const unsigned char *table); |
174 | static int fbcon_scrolldelta(struct vc_data *vc, int lines); | 174 | static int fbcon_scrolldelta(struct vc_data *vc, int lines); |
175 | 175 | ||
176 | /* | 176 | /* |
@@ -2652,7 +2652,7 @@ static struct fb_cmap palette_cmap = { | |||
2652 | 0, 16, palette_red, palette_green, palette_blue, NULL | 2652 | 0, 16, palette_red, palette_green, palette_blue, NULL |
2653 | }; | 2653 | }; |
2654 | 2654 | ||
2655 | static int fbcon_set_palette(struct vc_data *vc, unsigned char *table) | 2655 | static int fbcon_set_palette(struct vc_data *vc, const unsigned char *table) |
2656 | { | 2656 | { |
2657 | struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; | 2657 | struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; |
2658 | int i, j, k, depth; | 2658 | int i, j, k, depth; |
diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c index 296e94561556..8edc062536a8 100644 --- a/drivers/video/console/mdacon.c +++ b/drivers/video/console/mdacon.c | |||
@@ -481,7 +481,7 @@ static int mdacon_switch(struct vc_data *c) | |||
481 | return 1; /* redrawing needed */ | 481 | return 1; /* redrawing needed */ |
482 | } | 482 | } |
483 | 483 | ||
484 | static int mdacon_set_palette(struct vc_data *c, unsigned char *table) | 484 | static int mdacon_set_palette(struct vc_data *c, const unsigned char *table) |
485 | { | 485 | { |
486 | return -EINVAL; | 486 | return -EINVAL; |
487 | } | 487 | } |
diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index bb4e96255974..0553dfe684ef 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c | |||
@@ -574,7 +574,7 @@ static int newport_font_set(struct vc_data *vc, struct console_font *font, unsig | |||
574 | return newport_set_font(vc->vc_num, font); | 574 | return newport_set_font(vc->vc_num, font); |
575 | } | 575 | } |
576 | 576 | ||
577 | static int newport_set_palette(struct vc_data *vc, unsigned char *table) | 577 | static int newport_set_palette(struct vc_data *vc, const unsigned char *table) |
578 | { | 578 | { |
579 | return -EINVAL; | 579 | return -EINVAL; |
580 | } | 580 | } |
diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 026fd1215933..e440c2d9fe7c 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c | |||
@@ -79,7 +79,7 @@ static const char *sticon_startup(void) | |||
79 | return "STI console"; | 79 | return "STI console"; |
80 | } | 80 | } |
81 | 81 | ||
82 | static int sticon_set_palette(struct vc_data *c, unsigned char *table) | 82 | static int sticon_set_palette(struct vc_data *c, const unsigned char *table) |
83 | { | 83 | { |
84 | return -EINVAL; | 84 | return -EINVAL; |
85 | } | 85 | } |
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 517f565b65d7..8bf911002cba 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
@@ -80,7 +80,6 @@ static void vgacon_deinit(struct vc_data *c); | |||
80 | static void vgacon_cursor(struct vc_data *c, int mode); | 80 | static void vgacon_cursor(struct vc_data *c, int mode); |
81 | static int vgacon_switch(struct vc_data *c); | 81 | static int vgacon_switch(struct vc_data *c); |
82 | static int vgacon_blank(struct vc_data *c, int blank, int mode_switch); | 82 | static int vgacon_blank(struct vc_data *c, int blank, int mode_switch); |
83 | static int vgacon_set_palette(struct vc_data *vc, unsigned char *table); | ||
84 | static int vgacon_scrolldelta(struct vc_data *c, int lines); | 83 | static int vgacon_scrolldelta(struct vc_data *c, int lines); |
85 | static int vgacon_set_origin(struct vc_data *c); | 84 | static int vgacon_set_origin(struct vc_data *c); |
86 | static void vgacon_save_screen(struct vc_data *c); | 85 | static void vgacon_save_screen(struct vc_data *c); |
@@ -847,7 +846,7 @@ static int vgacon_switch(struct vc_data *c) | |||
847 | return 0; /* Redrawing not needed */ | 846 | return 0; /* Redrawing not needed */ |
848 | } | 847 | } |
849 | 848 | ||
850 | static void vga_set_palette(struct vc_data *vc, unsigned char *table) | 849 | static void vga_set_palette(struct vc_data *vc, const unsigned char *table) |
851 | { | 850 | { |
852 | int i, j; | 851 | int i, j; |
853 | 852 | ||
@@ -860,7 +859,7 @@ static void vga_set_palette(struct vc_data *vc, unsigned char *table) | |||
860 | } | 859 | } |
861 | } | 860 | } |
862 | 861 | ||
863 | static int vgacon_set_palette(struct vc_data *vc, unsigned char *table) | 862 | static int vgacon_set_palette(struct vc_data *vc, const unsigned char *table) |
864 | { | 863 | { |
865 | #ifdef CAN_LOAD_PALETTE | 864 | #ifdef CAN_LOAD_PALETTE |
866 | if (vga_video_type != VIDEO_TYPE_VGAC || vga_palette_blanked | 865 | if (vga_video_type != VIDEO_TYPE_VGAC || vga_palette_blanked |