Index: kernel/arch/ia64/src/ski/ski.c
===================================================================
--- kernel/arch/ia64/src/ski/ski.c	(revision 2270bef6e7fc859f0382d28283d4f427fc3d1c91)
+++ kernel/arch/ia64/src/ski/ski.c	(revision c640876a2871d801c859155f90c27f4d2ff40c11)
@@ -44,7 +44,6 @@
 #include <arch.h>
 
-static chardev_t *skiout;
-
-static chardev_t ski_stdout;
+static indev_t skiin;		/**< Ski input device. */
+static outdev_t skiout;		/**< Ski output device. */
 
 static bool kbd_disabled;
@@ -58,5 +57,5 @@
  * @param ch Character to be printed.
  */
-static void ski_putchar(chardev_t *d, const char ch, bool silent)
+static void ski_putchar(outdev_t *d, const char ch, bool silent)
 {
 	if (!silent) {
@@ -75,5 +74,9 @@
 }
 
-static chardev_operations_t ski_ops = {
+static indev_operations_t skiin_ops = {
+	.poll = NULL
+};
+
+static outdev_operations_t skiout_ops = {
 	.write = ski_putchar
 };
@@ -109,23 +112,14 @@
 {
 	char ch;
-	ipl_t ipl;
-	
-	ipl = interrupts_disable();
-	
-	if (kbd_disabled) {
-		interrupts_restore(ipl);
+	
+	if (kbd_disabled)
 		return;
-	}
-	
 	ch = ski_getchar();
 	if(ch == '\r')
 		ch = '\n'; 
-	if (ch && skiout) {
-		chardev_push_character(skiout, ch);
-		interrupts_restore(ipl);
+	if (ch) {
+		indev_push_character(&skiin, ch);
 		return;
 	}
-
-	interrupts_restore(ipl);
 }
 
@@ -148,6 +142,11 @@
  * to open debug console.
  */
-void ski_console_init(chardev_t *devout)
-{
+static void ski_init(void)
+{
+	static bool initialized;
+
+	if (initialized)
+		return;
+	
 	asm volatile (
 		"mov r15 = %0\n"
@@ -157,17 +156,33 @@
 		: "r15", "r8"
 	);
-
-	skiout = devout;
-	chardev_initialize("ski_stdout", &ski_stdout, &ski_ops);
-	stdout = &ski_stdout;
-
+	
+	initialized = true;
+}
+
+indev_t *skiin_init(void)
+{
+	ski_init();
+
+	indev_initialize("skiin", &skiin, &skiin_ops);
 	thread_t *t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true);
-	if (!t)
-		panic("Cannot create kkbdpoll.");
-	thread_ready(t);
+	if (t)
+		thread_ready(t);
+	else
+		return NULL;
 
 	sysinfo_set_item_val("kbd", NULL, true);
 	sysinfo_set_item_val("kbd.type", NULL, KBD_SKI);
 
+	return &skiin;
+}
+
+
+void skiout_init(void)
+{
+	ski_init();
+
+	outdev_initialize("skiout", &skiout, &skiout_ops);
+	stdout = &skiout;
+
 	sysinfo_set_item_val("fb", NULL, false);
 }
