diff options
Diffstat (limited to 'arch/ia64/hp/sim/hpsim_console.c')
-rw-r--r-- | arch/ia64/hp/sim/hpsim_console.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/ia64/hp/sim/hpsim_console.c b/arch/ia64/hp/sim/hpsim_console.c index 6e149c8ab835..01663bc42b1a 100644 --- a/arch/ia64/hp/sim/hpsim_console.c +++ b/arch/ia64/hp/sim/hpsim_console.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/machvec.h> | 21 | #include <asm/machvec.h> |
22 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
23 | #include <asm/sal.h> | 23 | #include <asm/sal.h> |
24 | #include <asm/hpsim.h> | ||
24 | 25 | ||
25 | #include "hpsim_ssc.h" | 26 | #include "hpsim_ssc.h" |
26 | 27 | ||
@@ -28,7 +29,7 @@ static int simcons_init (struct console *, char *); | |||
28 | static void simcons_write (struct console *, const char *, unsigned); | 29 | static void simcons_write (struct console *, const char *, unsigned); |
29 | static struct tty_driver *simcons_console_device (struct console *, int *); | 30 | static struct tty_driver *simcons_console_device (struct console *, int *); |
30 | 31 | ||
31 | struct console hpsim_cons = { | 32 | static struct console hpsim_cons = { |
32 | .name = "simcons", | 33 | .name = "simcons", |
33 | .write = simcons_write, | 34 | .write = simcons_write, |
34 | .device = simcons_console_device, | 35 | .device = simcons_console_device, |
@@ -58,7 +59,18 @@ simcons_write (struct console *cons, const char *buf, unsigned count) | |||
58 | 59 | ||
59 | static struct tty_driver *simcons_console_device (struct console *c, int *index) | 60 | static struct tty_driver *simcons_console_device (struct console *c, int *index) |
60 | { | 61 | { |
61 | extern struct tty_driver *hp_simserial_driver; | ||
62 | *index = c->index; | 62 | *index = c->index; |
63 | return hp_simserial_driver; | 63 | return hp_simserial_driver; |
64 | } | 64 | } |
65 | |||
66 | int simcons_register(void) | ||
67 | { | ||
68 | if (!ia64_platform_is("hpsim")) | ||
69 | return 1; | ||
70 | |||
71 | if (hpsim_cons.flags & CON_ENABLED) | ||
72 | return 1; | ||
73 | |||
74 | register_console(&hpsim_cons); | ||
75 | return 0; | ||
76 | } | ||