Index: uspace/app/klog/klog.c
===================================================================
--- uspace/app/klog/klog.c	(revision 692b30dc358f0a2b38f0772b48b4c4c82c8e7999)
+++ uspace/app/klog/klog.c	(revision e7497944438bc972c3ebd9a321c4088653de39c6)
@@ -82,10 +82,9 @@
 	}
 	
-	int devno = sysinfo_value("klog.devno");
-	int inr = sysinfo_value("klog.inr");
-	if (ipc_register_irq(inr, devno, 0, NULL) != EOK) {
-		printf(NAME ": Error registering klog notifications\n");
-		return -1;
-	}
+//	int inr = sysinfo_value("klog.inr");
+//	if (ipc_register_irq(inr, devno, 0, NULL) != EOK) {
+//		printf(NAME ": Error registering klog notifications\n");
+//		return -1;
+//	}
 	
 	async_set_interrupt_received(interrupt_received);
Index: uspace/lib/libc/generic/ddi.c
===================================================================
--- uspace/lib/libc/generic/ddi.c	(revision 692b30dc358f0a2b38f0772b48b4c4c82c8e7999)
+++ uspace/lib/libc/generic/ddi.c	(revision e7497944438bc972c3ebd9a321c4088653de39c6)
@@ -41,4 +41,14 @@
 #include <libarch/config.h>
 #include <kernel/ddi/ddi_arg.h>
+
+/** Return unique device number.
+ *
+ * @return New unique device number.
+ *
+ */
+int device_assign_devno(void)
+{
+	return __SYSCALL0(SYS_DEVICE_ASSIGN_DEVNO);
+}
 
 /** Map piece of physical memory to task.
Index: uspace/lib/libc/include/ddi.h
===================================================================
--- uspace/lib/libc/include/ddi.h	(revision 692b30dc358f0a2b38f0772b48b4c4c82c8e7999)
+++ uspace/lib/libc/include/ddi.h	(revision e7497944438bc972c3ebd9a321c4088653de39c6)
@@ -38,4 +38,5 @@
 #include <task.h>
 
+extern int device_assign_devno(void);
 extern int physmem_map(void *, void *, unsigned long, int);
 extern int iospace_enable(task_id_t, void *, unsigned long);
Index: uspace/srv/console/console.c
===================================================================
--- uspace/srv/console/console.c	(revision 692b30dc358f0a2b38f0772b48b4c4c82c8e7999)
+++ uspace/srv/console/console.c	(revision e7497944438bc972c3ebd9a321c4088653de39c6)
@@ -587,12 +587,11 @@
 	
 	/* Receive kernel notifications */
-	if (sysinfo_value("kconsole.present")) {
-		int devno = sysinfo_value("kconsole.devno");
-		int inr = sysinfo_value("kconsole.inr");
-		if (ipc_register_irq(inr, devno, 0, NULL) != EOK)
-			printf(NAME ": Error registering kconsole notifications\n");
-		
-		async_set_interrupt_received(interrupt_received);
-	}
+//	if (sysinfo_value("kconsole.present")) {
+//		int inr = sysinfo_value("kconsole.inr");
+//		if (ipc_register_irq(inr, device_assign_devno(), 0, NULL) != EOK)
+//			printf(NAME ": Error registering kconsole notifications\n");
+//		
+//		async_set_interrupt_received(interrupt_received);
+//	}
 	
 	// FIXME: avoid connectiong to itself, keep using klog
Index: uspace/srv/kbd/port/gxemul.c
===================================================================
--- uspace/srv/kbd/port/gxemul.c	(revision 692b30dc358f0a2b38f0772b48b4c4c82c8e7999)
+++ uspace/srv/kbd/port/gxemul.c	(revision e7497944438bc972c3ebd9a321c4088653de39c6)
@@ -40,4 +40,5 @@
 #include <kbd_port.h>
 #include <kbd.h>
+#include <ddi.h>
 
 static irq_cmd_t gxemul_cmds[] = {
@@ -64,5 +65,5 @@
 	async_set_interrupt_received(gxemul_irq_handler);
 	gxemul_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual");
-	ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),
+	ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(),
 	    0, &gxemul_kbd);
 	return 0;
Index: uspace/srv/kbd/port/i8042.c
===================================================================
--- uspace/srv/kbd/port/i8042.c	(revision 692b30dc358f0a2b38f0772b48b4c4c82c8e7999)
+++ uspace/srv/kbd/port/i8042.c	(revision e7497944438bc972c3ebd9a321c4088653de39c6)
@@ -44,4 +44,5 @@
 #include <kbd_port.h>
 #include <kbd.h>
+#include <ddi.h>
 #include "i8042.h"
 
@@ -137,5 +138,5 @@
 	i8042_kbd.cmds[0].addr = &((i8042_t *) i8042_kernel)->status;
 	i8042_kbd.cmds[3].addr = &((i8042_t *) i8042_kernel)->data;
-	ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &i8042_kbd);
+	ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 0, &i8042_kbd);
 
 	int newcontrol = i8042_KBD_IE | i8042_KBD_TRANSLATE;
Index: uspace/srv/kbd/port/msim.c
===================================================================
--- uspace/srv/kbd/port/msim.c	(revision 692b30dc358f0a2b38f0772b48b4c4c82c8e7999)
+++ uspace/srv/kbd/port/msim.c	(revision e7497944438bc972c3ebd9a321c4088653de39c6)
@@ -40,4 +40,5 @@
 #include <kbd_port.h>
 #include <kbd.h>
+#include <ddi.h>
 
 irq_cmd_t msim_cmds[] = {
@@ -64,5 +65,5 @@
 	async_set_interrupt_received(msim_irq_handler);
 	msim_cmds[0].addr = sysinfo_value("kbd.address.virtual");
-	ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),
+	ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(),
 	    0, &msim_kbd);
 	return 0;
Index: uspace/srv/kbd/port/ns16550.c
===================================================================
--- uspace/srv/kbd/port/ns16550.c	(revision 692b30dc358f0a2b38f0772b48b4c4c82c8e7999)
+++ uspace/srv/kbd/port/ns16550.c	(revision e7497944438bc972c3ebd9a321c4088653de39c6)
@@ -100,5 +100,5 @@
 	ns16550_kbd.cmds[0].addr = (void *) (ns16550_kernel + LSR_REG);
 	ns16550_kbd.cmds[3].addr = (void *) (ns16550_kernel + RBR_REG);
-	ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),
+	ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(),
 	    0, &ns16550_kbd);
 	return pio_enable((void *) ns16550_physical, 8, &vaddr);
Index: uspace/srv/kbd/port/z8530.c
===================================================================
--- uspace/srv/kbd/port/z8530.c	(revision 692b30dc358f0a2b38f0772b48b4c4c82c8e7999)
+++ uspace/srv/kbd/port/z8530.c	(revision e7497944438bc972c3ebd9a321c4088653de39c6)
@@ -90,5 +90,5 @@
 	z8530_cmds[3].addr = (void *) sysinfo_value("kbd.address.kernel") +
 	    CHAN_A_DATA;
-	ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),
+	ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(),
 	    sysinfo_value("kbd.inr"), &z8530_kbd);
 	return 0;
