Messages in this thread Patch in this message |  | | | Date | Sat, 22 Jul 2000 20:38:18 +0200 (CEST) | | From | Geert Uytterhoeven <> | | Subject | [PATCH 2.3.x] struct consw initialization |
| |
Hi Linus,
This patch converts all initializations of struct consw to `new style' C struct initializations.
--- linux-2.4.0-test5-pre4/drivers/video/dummycon.c Mon Jul 17 15:12:19 2000 +++ geert-consw-2.4.0-test5-pre4/drivers/video/dummycon.c Sat Jul 22 20:08:11 2000 @@ -45,6 +45,8 @@ return 0; } +#define DUMMY (void *)dummycon_dummy + /* * The console `switch' structure for the dummy console * @@ -52,19 +54,18 @@ */ struct consw dummy_con = { - dummycon_startup, dummycon_init, - (void *)dummycon_dummy, /* con_deinit */ - (void *)dummycon_dummy, /* con_clear */ - (void *)dummycon_dummy, /* con_putc */ - (void *)dummycon_dummy, /* con_putcs */ - (void *)dummycon_dummy, /* con_cursor */ - (void *)dummycon_dummy, /* con_scroll */ - (void *)dummycon_dummy, /* con_bmove */ - (void *)dummycon_dummy, /* con_switch */ - (void *)dummycon_dummy, /* con_blank */ - (void *)dummycon_dummy, /* con_font_op */ - (void *)dummycon_dummy, /* con_set_palette */ - (void *)dummycon_dummy, /* con_scrolldelta */ - NULL, /* con_set_origin */ - NULL, /* con_save_screen */ + con_startup: dummycon_startup, + con_init: dummycon_init, + con_deinit: DUMMY, + con_clear: DUMMY, + con_putc: DUMMY, + con_putcs: DUMMY, + con_cursor: DUMMY, + con_scroll: DUMMY, + con_bmove: DUMMY, + con_switch: DUMMY, + con_blank: DUMMY, + con_font_op: DUMMY, + con_set_palette: DUMMY, + con_scrolldelta: DUMMY, }; --- linux-2.4.0-test5-pre4/drivers/video/fbcon.c Tue Jul 18 14:09:07 2000 +++ geert-consw-2.4.0-test5-pre4/drivers/video/fbcon.c Sat Jul 22 20:00:16 2000 @@ -2400,8 +2400,6 @@ con_set_palette: fbcon_set_palette, con_scrolldelta: fbcon_scrolldelta, con_set_origin: fbcon_set_origin, - con_save_screen: NULL, - con_build_attr: NULL, con_invert_region: fbcon_invert_region, con_screen_pos: fbcon_screen_pos, con_getxy: fbcon_getxy, --- linux-2.4.0-test5-pre4/drivers/video/mdacon.c Tue Jul 18 13:54:43 2000 +++ geert-consw-2.4.0-test5-pre4/drivers/video/mdacon.c Sat Jul 22 20:11:39 2000 @@ -586,24 +586,22 @@ */ struct consw mda_con = { - mdacon_startup, /* con_startup */ - mdacon_init, /* con_init */ - mdacon_deinit, /* con_deinit */ - mdacon_clear, /* con_clear */ - mdacon_putc, /* con_putc */ - mdacon_putcs, /* con_putcs */ - mdacon_cursor, /* con_cursor */ - mdacon_scroll, /* con_scroll */ - mdacon_bmove, /* con_bmove */ - mdacon_switch, /* con_switch */ - mdacon_blank, /* con_blank */ - mdacon_font_op, /* con_font_op */ - mdacon_set_palette, /* con_set_palette */ - mdacon_scrolldelta, /* con_scrolldelta */ - NULL, /* con_set_origin */ - NULL, /* con_save_screen */ - mdacon_build_attr, /* con_build_attr */ - mdacon_invert_region, /* con_invert_region */ + con_startup: mdacon_startup, + con_init: mdacon_init, + con_deinit: mdacon_deinit, + con_clear: mdacon_clear, + con_putc: mdacon_putc, + con_putcs: mdacon_putcs, + con_cursor: mdacon_cursor, + con_scroll: mdacon_scroll, + con_bmove: mdacon_bmove, + con_switch: mdacon_switch, + con_blank: mdacon_blank, + con_font_op: mdacon_font_op, + con_set_palette: mdacon_set_palette, + con_scrolldelta: mdacon_scrolldelta, + con_build_attr: mdacon_build_attr, + con_invert_region: mdacon_invert_region, }; #ifdef MODULE --- linux-2.4.0-test5-pre4/drivers/video/newport_con.c Tue Jul 18 14:07:22 2000 +++ geert-consw-2.4.0-test5-pre4/drivers/video/newport_con.c Sat Jul 22 20:13:01 2000 @@ -575,24 +575,22 @@ #define DUMMY (void *) newport_dummy struct consw newport_con = { - newport_startup, - newport_init, - DUMMY, /* con_deinit */ - newport_clear, - newport_putc, - newport_putcs, - newport_cursor, - newport_scroll, - newport_bmove, - newport_switch, - newport_blank, - newport_font_op, - newport_set_palette, - newport_scrolldelta, - DUMMY, /* newport_set_origin, */ - DUMMY, /* newport_save_screen */ - NULL, /* newport_build_attr */ - NULL /* newport_invert_region */ + con_startup: newport_startup, + con_init: newport_init, + con_deinit: DUMMY, + con_clear: newport_clear, + con_putc: newport_putc, + con_putcs: newport_putcs, + con_cursor: newport_cursor, + con_scroll: newport_scroll, + con_bmove: newport_bmove, + con_switch: newport_switch, + con_blank: newport_blank, + con_font_op: newport_font_op, + con_set_palette: newport_set_palette, + con_scrolldelta: newport_scrolldelta, + con_set_origin: DUMMY, + con_save_screen: DUMMY, }; #ifdef MODULE --- linux-2.4.0-test5-pre4/drivers/video/promcon.c Mon Jul 17 14:46:47 2000 +++ geert-consw-2.4.0-test5-pre4/drivers/video/promcon.c Sat Jul 22 20:01:59 2000 @@ -581,14 +581,9 @@ con_font_op: promcon_font_op, con_set_palette: DUMMY, con_scrolldelta: DUMMY, - con_set_origin: NULL, - con_save_screen: NULL, -#if PROMCON_COLOR - con_build_attr: NULL, -#else +#if !(PROMCON_COLOR) con_build_attr: promcon_build_attr, #endif - con_invert_region: NULL, }; void __init prom_con_init(void) --- linux-2.4.0-test5-pre4/drivers/video/vgacon.c Mon Jul 17 15:27:04 2000 +++ geert-consw-2.4.0-test5-pre4/drivers/video/vgacon.c Sat Jul 22 20:15:03 2000 @@ -1038,22 +1038,22 @@ #define DUMMY (void *) vgacon_dummy struct consw vga_con = { - vgacon_startup, - vgacon_init, - vgacon_deinit, - DUMMY, /* con_clear */ - DUMMY, /* con_putc */ - DUMMY, /* con_putcs */ - vgacon_cursor, - vgacon_scroll, /* con_scroll */ - DUMMY, /* con_bmove */ - vgacon_switch, - vgacon_blank, - vgacon_font_op, - vgacon_set_palette, - vgacon_scrolldelta, - vgacon_set_origin, - vgacon_save_screen, - vgacon_build_attr, - vgacon_invert_region + con_startup: vgacon_startup, + con_init: vgacon_init, + con_deinit: vgacon_deinit, + con_clear: DUMMY, + con_putc: DUMMY, + con_putcs: DUMMY, + con_cursor: vgacon_cursor, + con_scroll: vgacon_scroll, + con_bmove: DUMMY, + con_switch: vgacon_switch, + con_blank: vgacon_blank, + con_font_op: vgacon_font_op, + con_set_palette: vgacon_set_palette, + con_scrolldelta: vgacon_scrolldelta, + con_set_origin: vgacon_set_origin, + con_save_screen: vgacon_save_screen, + con_build_attr: vgacon_build_attr, + con_invert_region: vgacon_invert_region, }; Gr{oetje,eeting}s, Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
|  |