[PATCH] W1: w1_netlink: New init/fini netlink callbacks.
[linux-2.6/verdex.git] / drivers / video / console / dummycon.c
blob1ecda91e5a9ce254784ced7b7c2f5340c0c6eb6e
1 /*
2 * linux/drivers/video/dummycon.c -- A dummy console driver
4 * To be used if there's no other console driver (e.g. for plain VGA text)
5 * available, usually until fbcon takes console over.
6 */
8 #include <linux/types.h>
9 #include <linux/kdev_t.h>
10 #include <linux/tty.h>
11 #include <linux/console.h>
12 #include <linux/vt_kern.h>
13 #include <linux/init.h>
14 #include <linux/module.h>
17 * Dummy console driver
20 #if defined(__arm__)
21 #define DUMMY_COLUMNS ORIG_VIDEO_COLS
22 #define DUMMY_ROWS ORIG_VIDEO_LINES
23 #elif defined(__hppa__)
24 /* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */
25 #include <linux/config.h>
26 #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS
27 #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS
28 #else
29 #define DUMMY_COLUMNS 80
30 #define DUMMY_ROWS 25
31 #endif
33 static const char *dummycon_startup(void)
35 return "dummy device";
38 static void dummycon_init(struct vc_data *vc, int init)
40 vc->vc_can_do_color = 1;
41 if (init) {
42 vc->vc_cols = DUMMY_COLUMNS;
43 vc->vc_rows = DUMMY_ROWS;
44 } else
45 vc_resize(vc, DUMMY_COLUMNS, DUMMY_ROWS);
48 static int dummycon_dummy(void)
50 return 0;
53 #define DUMMY (void *)dummycon_dummy
56 * The console `switch' structure for the dummy console
58 * Most of the operations are dummies.
61 const struct consw dummy_con = {
62 .owner = THIS_MODULE,
63 .con_startup = dummycon_startup,
64 .con_init = dummycon_init,
65 .con_deinit = DUMMY,
66 .con_clear = DUMMY,
67 .con_putc = DUMMY,
68 .con_putcs = DUMMY,
69 .con_cursor = DUMMY,
70 .con_scroll = DUMMY,
71 .con_bmove = DUMMY,
72 .con_switch = DUMMY,
73 .con_blank = DUMMY,
74 .con_font_set = DUMMY,
75 .con_font_get = DUMMY,
76 .con_font_default = DUMMY,
77 .con_font_copy = DUMMY,
78 .con_set_palette = DUMMY,
79 .con_scrolldelta = DUMMY,