import of ftp.dlink.com/GPL/DSMG-600_reB/ppclinux.tar.gz
[linux-2.4.21-pre4.git] / drivers / sgi / char / sgicons.c
1 /*
2  * sgicons.c: Setting up and registering console I/O on the SGI.
3  *
4  * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
5  * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx)
6  *
7  * This implements a virtual console interface.
8  */
9 #include <linux/init.h>
10 #include <linux/kernel.h>
11 #include <linux/errno.h>
12 #include <linux/module.h>
13 #include <asm/uaccess.h>
14 #include "gconsole.h"
15
16 /* This is the system graphics console (the first adapter found) */
17 struct console_ops *gconsole = 0;
18 struct console_ops *real_gconsole = 0;
19
20 void
21 enable_gconsole (void)
22 {
23         if (!gconsole)
24                 gconsole = real_gconsole;
25 }
26
27 void
28 disable_gconsole (void)
29 {
30         if (gconsole){
31                 real_gconsole = gconsole;
32                 gconsole = 0;
33         }
34 }
35
36 EXPORT_SYMBOL(disable_gconsole);
37 EXPORT_SYMBOL(enable_gconsole);
38
39 void
40 register_gconsole (struct console_ops *gc)
41 {
42         if (gconsole)
43                 return;
44         gconsole = gc;
45 }