Index: kernel/genarch/include/kbrd/kbrd.h
===================================================================
--- kernel/genarch/include/kbrd/kbrd.h	(revision a7efdeccd006858ee92409fe37182c9a8d2a3866)
+++ kernel/genarch/include/kbrd/kbrd.h	(revision b6f2ebc121083b3174c2827f720edaa48bc90f66)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
@@ -39,7 +39,5 @@
 #include <console/chardev.h>
 
-extern chardev_t kbrdin;
-
-extern void kbrd_init(chardev_t *);
+extern void kbrd_init(indev_t *devin);
 
 #endif
Index: kernel/genarch/include/srln/srln.h
===================================================================
--- kernel/genarch/include/srln/srln.h	(revision a7efdeccd006858ee92409fe37182c9a8d2a3866)
+++ kernel/genarch/include/srln/srln.h	(revision b6f2ebc121083b3174c2827f720edaa48bc90f66)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
@@ -39,7 +39,5 @@
 #include <console/chardev.h>
 
-extern chardev_t srlnin;
-
-extern void srln_init(chardev_t *);
+extern void srln_init(indev_t *devin);
 
 #endif
Index: kernel/genarch/src/kbrd/kbrd.c
===================================================================
--- kernel/genarch/src/kbrd/kbrd.c	(revision a7efdeccd006858ee92409fe37182c9a8d2a3866)
+++ kernel/genarch/src/kbrd/kbrd.c	(revision b6f2ebc121083b3174c2827f720edaa48bc90f66)
@@ -27,10 +27,10 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
 /**
  * @file
- * @brief	Keyboard processing.
+ * @brief Keyboard processing.
  */
 
@@ -54,32 +54,22 @@
 
 #ifdef CONFIG_SUN_KBD
-#	define IGNORE_CODE	0x7f
-#endif
-
-#define KEY_RELEASE		0x80
-
-#define PRESSED_SHIFT		(1 << 0)
-#define PRESSED_CAPSLOCK	(1 << 1)
-#define LOCKED_CAPSLOCK		(1 << 0)
-
-chardev_t kbrdin;
-static chardev_t *kbdout;
-
-static void kbrdin_suspend(chardev_t *d)
-{
-}
-
-static void kbrdin_resume(chardev_t *d)
-{
-}
-
-chardev_operations_t kbrdin_ops = {
-	.suspend = kbrdin_suspend,
-	.resume = kbrdin_resume,
+	#define IGNORE_CODE  0x7f
+#endif
+
+#define KEY_RELEASE  0x80
+
+#define PRESSED_SHIFT     (1 << 0)
+#define PRESSED_CAPSLOCK  (1 << 1)
+#define LOCKED_CAPSLOCK   (1 << 0)
+
+static indev_t kbrdout;
+
+indev_operations_t kbrdout_ops = {
+	.poll = NULL
 };
 
-SPINLOCK_INITIALIZE(keylock);		/**< keylock protects keyflags and lockflags. */
-static volatile int keyflags;		/**< Tracking of multiple keypresses. */
-static volatile int lockflags;		/**< Tracking of multiple keys lockings. */
+SPINLOCK_INITIALIZE(keylock);   /**< keylock protects keyflags and lockflags. */
+static volatile int keyflags;   /**< Tracking of multiple keypresses. */
+static volatile int lockflags;  /**< Tracking of multiple keys lockings. */
 
 static void key_released(uint8_t);
@@ -88,10 +78,9 @@
 static void kkbrd(void *arg)
 {
-	chardev_t *in = (chardev_t *) arg;
-	uint8_t sc;
-
-	while (1) {
-		sc = _getc(in);
-
+	indev_t *in = (indev_t *) arg;
+	
+	while (true) {
+		uint8_t sc = _getc(in);
+		
 #ifdef CONFIG_SUN_KBD
 		if (sc == IGNORE_CODE)
@@ -106,15 +95,14 @@
 }
 
-
-void kbrd_init(chardev_t *devout)
-{
-	thread_t *t;
-
-	chardev_initialize("kbrd", &kbrdin, &kbrdin_ops);
-	kbdout = devout;
+void kbrd_init(indev_t *devin)
+{
+	indev_initialize("kbrd", &kbrdout, &kbrdout_ops);
+	thread_t *thread
+	    = thread_create(kkbrd, devin, TASK, 0, "kkbrd", false);
 	
-	t = thread_create(kkbrd, &kbrdin, TASK, 0, "kkbrd", false);
-	ASSERT(t);
-	thread_ready(t);
+	if (thread) {
+		stdin = &kbrdout;
+		thread_ready(thread);
+	}
 }
 
@@ -154,10 +142,10 @@
 	bool shift, capslock;
 	bool letter = false;
-
+	
 	spinlock_lock(&keylock);
 	switch (sc) {
 	case SC_LSHIFT:
 	case SC_RSHIFT:
-	    	keyflags |= PRESSED_SHIFT;
+		keyflags |= PRESSED_SHIFT;
 		break;
 	case SC_CAPSLOCK:
@@ -167,41 +155,41 @@
 		break;
 	case SC_LEFTARR:
-		chardev_push_character(kbdout, 0x1b);
-		chardev_push_character(kbdout, 0x5b);
-		chardev_push_character(kbdout, 0x44);
+		indev_push_character(stdin, 0x1b);
+		indev_push_character(stdin, 0x5b);
+		indev_push_character(stdin, 0x44);
 		break;
 	case SC_RIGHTARR:
-		chardev_push_character(kbdout, 0x1b);
-		chardev_push_character(kbdout, 0x5b);
-		chardev_push_character(kbdout, 0x43);
+		indev_push_character(stdin, 0x1b);
+		indev_push_character(stdin, 0x5b);
+		indev_push_character(stdin, 0x43);
 		break;
 	case SC_UPARR:
-		chardev_push_character(kbdout, 0x1b);
-		chardev_push_character(kbdout, 0x5b);
-		chardev_push_character(kbdout, 0x41);
+		indev_push_character(stdin, 0x1b);
+		indev_push_character(stdin, 0x5b);
+		indev_push_character(stdin, 0x41);
 		break;
 	case SC_DOWNARR:
-		chardev_push_character(kbdout, 0x1b);
-		chardev_push_character(kbdout, 0x5b);
-		chardev_push_character(kbdout, 0x42);
+		indev_push_character(stdin, 0x1b);
+		indev_push_character(stdin, 0x5b);
+		indev_push_character(stdin, 0x42);
 		break;
 	case SC_HOME:
-		chardev_push_character(kbdout, 0x1b);
-		chardev_push_character(kbdout, 0x4f);
-		chardev_push_character(kbdout, 0x48);
+		indev_push_character(stdin, 0x1b);
+		indev_push_character(stdin, 0x4f);
+		indev_push_character(stdin, 0x48);
 		break;
 	case SC_END:
-		chardev_push_character(kbdout, 0x1b);
-		chardev_push_character(kbdout, 0x4f);
-		chardev_push_character(kbdout, 0x46);
+		indev_push_character(stdin, 0x1b);
+		indev_push_character(stdin, 0x4f);
+		indev_push_character(stdin, 0x46);
 		break;
 	case SC_DELETE:
-		chardev_push_character(kbdout, 0x1b);
-		chardev_push_character(kbdout, 0x5b);
-		chardev_push_character(kbdout, 0x33);
-		chardev_push_character(kbdout, 0x7e);
+		indev_push_character(stdin, 0x1b);
+		indev_push_character(stdin, 0x5b);
+		indev_push_character(stdin, 0x33);
+		indev_push_character(stdin, 0x7e);
 		break;
 	default:
-	    	letter = islower(ascii);
+		letter = islower(ascii);
 		capslock = (keyflags & PRESSED_CAPSLOCK) ||
 		    (lockflags & LOCKED_CAPSLOCK);
@@ -211,5 +199,5 @@
 		if (shift)
 			map = sc_secondary_map;
-		chardev_push_character(kbdout, map[sc]);
+		indev_push_character(stdin, map[sc]);
 		break;
 	}
Index: kernel/genarch/src/srln/srln.c
===================================================================
--- kernel/genarch/src/srln/srln.c	(revision a7efdeccd006858ee92409fe37182c9a8d2a3866)
+++ kernel/genarch/src/srln/srln.c	(revision b6f2ebc121083b3174c2827f720edaa48bc90f66)
@@ -27,10 +27,10 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
 /**
  * @file
- * @brief	Serial line processing.
+ * @brief Serial line processing.
  */
 
@@ -41,49 +41,48 @@
 #include <arch.h>
 
-chardev_t srlnin;
-static chardev_t *srlnout;
+static indev_t srlnout;
 
-static void srlnin_suspend(chardev_t *d)
-{
-}
-
-static void srlnin_resume(chardev_t *d)
-{
-}
-
-chardev_operations_t srlnin_ops = {
-	.suspend = srlnin_suspend,
-	.resume = srlnin_resume,
+indev_operations_t srlnout_ops = {
+	.poll = NULL
 };
 
 static void ksrln(void *arg)
 {
-	chardev_t *in = (chardev_t *) arg;
-	uint8_t ch;
-
-	while (1) {
-		ch = _getc(in);
+	indev_t *in = (indev_t *) arg;
+	bool cr = false;
+	
+	while (true) {
+		uint8_t ch = _getc(in);
 		
-		if (ch == '\r')
+		if ((ch == '\n') && (cr)) {
+			cr = false;
 			continue;
+		}
 		
-		chardev_push_character(srlnout, ch);
+		if (ch == '\r') {
+			ch = '\n';
+			cr = true;
+		} else
+			cr = false;
+		
+		if (ch == 0x7f)
+			ch = '\b';
+		
+		indev_push_character(stdin, ch);
 	}
 }
 
-
-void srln_init(chardev_t *devout)
+void srln_init(indev_t *devin)
 {
-	thread_t *t;
-
-	chardev_initialize("srln", &srlnin, &srlnin_ops);
-	srlnout = devout;
+	indev_initialize("srln", &srlnout, &srlnout_ops);
+	thread_t *thread
+	    = thread_create(ksrln, devin, TASK, 0, "ksrln", false);
 	
-	t = thread_create(ksrln, &srlnin, TASK, 0, "ksrln", false);
-	ASSERT(t);
-	thread_ready(t);
+	if (thread) {
+		stdin = &srlnout;
+		thread_ready(thread);
+	}
 }
 
 /** @}
  */
-
