summaryrefslogtreecommitdiff
path: root/arch/ia64/hp/sim/hpsim_console.c
diff options
context:
space:
mode:
authorJustin Waters <justin.waters@timesys.com>2008-02-26 13:07:02 -0500
committerJustin Waters <justin.waters@timesys.com>2008-02-26 13:07:02 -0500
commitb80a32b9cc634adfa8eaef33ec981e7febf2ade2 (patch)
treef256bce13ba11f514a388160df84e1410bedbe2b /arch/ia64/hp/sim/hpsim_console.c
parent594133ef22fae0d737bd1b57352cf3f48a192c63 (diff)
Update the i.MX31 Kernel to 2.6.232.6.23-mx31ads-2008022618072.6.23-mx31-200802261807
This is the result of a brute-force attempt to update the kernel to 2.6.23. Now that we have a git tree, our effort will be a little nicer in the future. Signed-off-by: Justin Waters <justin.waters@timesys.com>
Diffstat (limited to 'arch/ia64/hp/sim/hpsim_console.c')
-rw-r--r--arch/ia64/hp/sim/hpsim_console.c16
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 @@
#include <asm/machvec.h>
#include <asm/pgtable.h>
#include <asm/sal.h>
+#include <asm/hpsim.h>
#include "hpsim_ssc.h"
@@ -28,7 +29,7 @@ static int simcons_init (struct console *, char *);
static void simcons_write (struct console *, const char *, unsigned);
static struct tty_driver *simcons_console_device (struct console *, int *);
-struct console hpsim_cons = {
+static struct console hpsim_cons = {
.name = "simcons",
.write = simcons_write,
.device = simcons_console_device,
@@ -58,7 +59,18 @@ simcons_write (struct console *cons, const char *buf, unsigned count)
static struct tty_driver *simcons_console_device (struct console *c, int *index)
{
- extern struct tty_driver *hp_simserial_driver;
*index = c->index;
return hp_simserial_driver;
}
+
+int simcons_register(void)
+{
+ if (!ia64_platform_is("hpsim"))
+ return 1;
+
+ if (hpsim_cons.flags & CON_ENABLED)
+ return 1;
+
+ register_console(&hpsim_cons);
+ return 0;
+}