Index: uspace/srv/hid/input/generic/input.c
===================================================================
--- uspace/srv/hid/input/generic/input.c	(revision 99ac5cf97460b67d1cf745618acf386fef0e193e)
+++ uspace/srv/hid/input/generic/input.c	(revision 2b621cb00cfabefc8ea4a5a0f58b59511dedf1a8)
@@ -47,7 +47,5 @@
 #include <stdio.h>
 #include <ns.h>
-#include <ns_obsolete.h>
 #include <async.h>
-#include <async_obsolete.h>
 #include <errno.h>
 #include <adt/fifo.h>
@@ -63,7 +61,4 @@
 #include <mouse.h>
 
-// FIXME: remove this header
-#include <abi/ipc/methods.h>
-
 #define NUM_LAYOUTS  3
 
@@ -77,5 +72,5 @@
 static void kbd_devs_reclaim(void);
 
-int client_phone = -1;
+async_sess_t *client_sess = NULL;
 
 /** List of keyboard devices */
@@ -86,5 +81,5 @@
 
 bool irc_service = false;
-int irc_phone = -1;
+async_sess_t *irc_sess = NULL;
 
 void kbd_push_data(kbd_dev_t *kdev, sysarg_t data)
@@ -170,6 +165,8 @@
 	
 	ev.c = layout_parse_ev(kdev->active_layout, &ev);
-	async_obsolete_msg_4(client_phone, INPUT_EVENT_KEY, ev.type, ev.key,
-	    ev.mods, ev.c);
+	
+	async_exch_t *exch = async_exchange_begin(client_sess);
+	async_msg_4(exch, INPUT_EVENT_KEY, ev.type, ev.key, ev.mods, ev.c);
+	async_exchange_end(exch);
 }
 
@@ -177,5 +174,7 @@
 void mouse_push_event_move(mouse_dev_t *mdev, int dx, int dy)
 {
-	async_obsolete_msg_2(client_phone, INPUT_EVENT_MOVE, dx, dy);
+	async_exch_t *exch = async_exchange_begin(client_sess);
+	async_msg_2(exch, INPUT_EVENT_MOVE, dx, dy);
+	async_exchange_end(exch);
 }
 
@@ -183,22 +182,21 @@
 void mouse_push_event_button(mouse_dev_t *mdev, int bnum, int press)
 {
-	async_obsolete_msg_2(client_phone, INPUT_EVENT_BUTTON, bnum, press);
+	async_exch_t *exch = async_exchange_begin(client_sess);
+	async_msg_2(exch, INPUT_EVENT_BUTTON, bnum, press);
+	async_exchange_end(exch);
 }
 
 static void client_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
 {
-	ipc_callid_t callid;
-	ipc_call_t call;
-	int retval;
-	
 	async_answer_0(iid, EOK);
 	
 	while (true) {
-		callid = async_get_call(&call);
+		ipc_call_t call;
+		ipc_callid_t callid = async_get_call(&call);
 		
 		if (!IPC_GET_IMETHOD(call)) {
-			if (client_phone != -1) {
-				async_obsolete_hangup(client_phone);
-				client_phone = -1;
+			if (client_sess != NULL) {
+				async_hangup(client_sess);
+				client_sess = NULL;
 			}
 			
@@ -207,26 +205,26 @@
 		}
 		
-		switch (IPC_GET_IMETHOD(call)) {
-		case IPC_M_CONNECT_TO_ME:
-			if (client_phone != -1) {
-				retval = ELIMIT;
+		async_sess_t *sess =
+		    async_callback_receive_start(EXCHANGE_SERIALIZE, &call);
+		if (sess != NULL) {
+			if (client_sess == NULL) {
+				client_sess = sess;
+				async_answer_0(callid, EOK);
+			} else
+				async_answer_0(callid, ELIMIT);
+		} else {
+			switch (IPC_GET_IMETHOD(call)) {
+			case INPUT_YIELD:
+				kbd_devs_yield();
+				async_answer_0(callid, EOK);
 				break;
+			case INPUT_RECLAIM:
+				kbd_devs_reclaim();
+				async_answer_0(callid, EOK);
+				break;
+			default:
+				async_answer_0(callid, EINVAL);
 			}
-			client_phone = IPC_GET_ARG5(call);
-			retval = 0;
-			break;
-		case INPUT_YIELD:
-			kbd_devs_yield();
-			retval = 0;
-			break;
-		case INPUT_RECLAIM:
-			kbd_devs_reclaim();
-			retval = 0;
-			break;
-		default:
-			retval = EINVAL;
 		}
-		
-		async_answer_0(callid, retval);
 	}
 }
@@ -648,6 +646,7 @@
 	
 	if (irc_service) {
-		while (irc_phone < 0)
-			irc_phone = service_obsolete_connect_blocking(SERVICE_IRC, 0, 0);
+		while (irc_sess == NULL)
+			irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
+			    SERVICE_IRC, 0, 0);
 	}
 	
