Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jiri Slaby and committed by
Greg Kroah-Hartman
8ede5cce 34902b7f

+11 -12
+1 -1
drivers/tty/vt/vt.c
··· 1039 1039 #define VT100ID "\033[?1;2c" 1040 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 1043 8,12,10,14, 9,13,11,15 }; 1044 1044 1045 1045 /* the default colour table, for VGA+ colour systems */
+1 -1
drivers/usb/misc/sisusbvga/sisusb_con.c
··· 601 601 602 602 /* interface routine */ 603 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 606 struct sisusb_usb_data *sisusb; 607 607 int i, j;
+2 -2
drivers/video/console/fbcon.c
··· 170 170 int height, int width); 171 171 static int fbcon_switch(struct vc_data *vc); 172 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 174 static int fbcon_scrolldelta(struct vc_data *vc, int lines); 175 175 176 176 /* ··· 2652 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 2657 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; 2658 2658 int i, j, k, depth;
+1 -1
drivers/video/console/mdacon.c
··· 481 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 486 return -EINVAL; 487 487 }
+1 -1
drivers/video/console/newport_con.c
··· 574 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 579 return -EINVAL; 580 580 }
+1 -1
drivers/video/console/sticon.c
··· 79 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 84 return -EINVAL; 85 85 }
+2 -3
drivers/video/console/vgacon.c
··· 80 80 static void vgacon_cursor(struct vc_data *c, int mode); 81 81 static int vgacon_switch(struct vc_data *c); 82 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 83 static int vgacon_scrolldelta(struct vc_data *c, int lines); 85 84 static int vgacon_set_origin(struct vc_data *c); 86 85 static void vgacon_save_screen(struct vc_data *c); ··· 846 847 return 0; /* Redrawing not needed */ 847 848 } 848 849 849 - static void vga_set_palette(struct vc_data *vc, unsigned char *table) 850 + static void vga_set_palette(struct vc_data *vc, const unsigned char *table) 850 851 { 851 852 int i, j; 852 853 ··· 859 860 } 860 861 } 861 862 862 - static int vgacon_set_palette(struct vc_data *vc, unsigned char *table) 863 + static int vgacon_set_palette(struct vc_data *vc, const unsigned char *table) 863 864 { 864 865 #ifdef CAN_LOAD_PALETTE 865 866 if (vga_video_type != VIDEO_TYPE_VGAC || vga_palette_blanked
+1 -1
include/linux/console.h
··· 47 47 int (*con_font_copy)(struct vc_data *, int); 48 48 int (*con_resize)(struct vc_data *, unsigned int, unsigned int, 49 49 unsigned int); 50 - int (*con_set_palette)(struct vc_data *, unsigned char *); 50 + int (*con_set_palette)(struct vc_data *, const unsigned char *); 51 51 int (*con_scrolldelta)(struct vc_data *, int); 52 52 int (*con_set_origin)(struct vc_data *); 53 53 void (*con_save_screen)(struct vc_data *);
+1 -1
include/linux/selection.h
··· 24 24 25 25 extern int console_blanked; 26 26 27 - extern unsigned char color_table[]; 27 + extern const unsigned char color_table[]; 28 28 extern int default_red[]; 29 29 extern int default_grn[]; 30 30 extern int default_blu[];