Index: uspace/lib/drv/generic/remote_usbhid.c
===================================================================
--- uspace/lib/drv/generic/remote_usbhid.c	(revision 3fafe5e03bb501f8627b315f8e97330dd3996f86)
+++ uspace/lib/drv/generic/remote_usbhid.c	(revision 984a9ba2fa05c490a7066737655ed19130c714e8)
@@ -283,8 +283,8 @@
 }
 
-static void remote_usbhid_get_event_length(ddf_fun_t *, void *, cap_call_handle_t, ipc_call_t *);
-static void remote_usbhid_get_event(ddf_fun_t *, void *, cap_call_handle_t, ipc_call_t *);
-static void remote_usbhid_get_report_descriptor_length(ddf_fun_t *, void *, cap_call_handle_t, ipc_call_t *);
-static void remote_usbhid_get_report_descriptor(ddf_fun_t *, void *, cap_call_handle_t, ipc_call_t *);
+static void remote_usbhid_get_event_length(ddf_fun_t *, void *, ipc_call_t *);
+static void remote_usbhid_get_event(ddf_fun_t *, void *, ipc_call_t *);
+static void remote_usbhid_get_report_descriptor_length(ddf_fun_t *, void *, ipc_call_t *);
+static void remote_usbhid_get_report_descriptor(ddf_fun_t *, void *, ipc_call_t *);
 
 /** Remote USB HID interface operations. */
@@ -306,5 +306,5 @@
 
 void remote_usbhid_get_event_length(ddf_fun_t *fun, void *iface,
-    cap_call_handle_t chandle, ipc_call_t *call)
+    ipc_call_t *call)
 {
 	printf("remote_usbhid_get_event_length()\n");
@@ -314,19 +314,19 @@
 	if (!hid_iface->get_event_length) {
 		printf("Get event length not set!\n");
-		async_answer_0(chandle, ENOTSUP);
+		async_answer_0(call, ENOTSUP);
 		return;
 	}
 
 	size_t len = hid_iface->get_event_length(fun);
-	async_answer_1(chandle, EOK, len);
+	async_answer_1(call, EOK, len);
 }
 
 void remote_usbhid_get_event(ddf_fun_t *fun, void *iface,
-    cap_call_handle_t chandle, ipc_call_t *call)
+    ipc_call_t *call)
 {
 	usbhid_iface_t *hid_iface = (usbhid_iface_t *) iface;
 
 	if (!hid_iface->get_event) {
-		async_answer_0(chandle, ENOTSUP);
+		async_answer_0(call, ENOTSUP);
 		return;
 	}
@@ -334,14 +334,14 @@
 	unsigned int flags = DEV_IPC_GET_ARG1(*call);
 
+	ipc_call_t data;
 	size_t len;
-	cap_call_handle_t data_chandle;
-	if (!async_data_read_receive(&data_chandle, &len)) {
-		async_answer_0(chandle, EPARTY);
+	if (!async_data_read_receive(&data, &len)) {
+		async_answer_0(call, EPARTY);
 		return;
 	}
 
 	if (len == 0) {
-		async_answer_0(data_chandle, EINVAL);
-		async_answer_0(chandle, EINVAL);
+		async_answer_0(&data, EINVAL);
+		async_answer_0(call, EINVAL);
 		return;
 	}
@@ -349,8 +349,8 @@
 	errno_t rc;
 
-	uint8_t *data = malloc(len);
-	if (data == NULL) {
-		async_answer_0(data_chandle, ENOMEM);
-		async_answer_0(chandle, ENOMEM);
+	uint8_t *event = malloc(len);
+	if (event == NULL) {
+		async_answer_0(&data, ENOMEM);
+		async_answer_0(call, ENOMEM);
 		return;
 	}
@@ -358,9 +358,9 @@
 	size_t act_length;
 	int event_nr;
-	rc = hid_iface->get_event(fun, data, len, &act_length, &event_nr, flags);
+	rc = hid_iface->get_event(fun, event, len, &act_length, &event_nr, flags);
 	if (rc != EOK) {
-		free(data);
-		async_answer_0(data_chandle, rc);
-		async_answer_0(chandle, rc);
+		free(event);
+		async_answer_0(&data, rc);
+		async_answer_0(call, rc);
 		return;
 	}
@@ -371,45 +371,45 @@
 	}
 
-	async_data_read_finalize(data_chandle, data, act_length);
-
-	free(data);
-
-	async_answer_1(chandle, EOK, event_nr);
+	async_data_read_finalize(&data, event, act_length);
+
+	free(event);
+
+	async_answer_1(call, EOK, event_nr);
 }
 
 void remote_usbhid_get_report_descriptor_length(ddf_fun_t *fun, void *iface,
-    cap_call_handle_t chandle, ipc_call_t *call)
+    ipc_call_t *call)
 {
 	usbhid_iface_t *hid_iface = (usbhid_iface_t *) iface;
 
 	if (!hid_iface->get_report_descriptor_length) {
-		async_answer_0(chandle, ENOTSUP);
+		async_answer_0(call, ENOTSUP);
 		return;
 	}
 
 	size_t len = hid_iface->get_report_descriptor_length(fun);
-	async_answer_1(chandle, EOK, (sysarg_t) len);
+	async_answer_1(call, EOK, (sysarg_t) len);
 }
 
 void remote_usbhid_get_report_descriptor(ddf_fun_t *fun, void *iface,
-    cap_call_handle_t chandle, ipc_call_t *call)
+    ipc_call_t *call)
 {
 	usbhid_iface_t *hid_iface = (usbhid_iface_t *) iface;
 
 	if (!hid_iface->get_report_descriptor) {
-		async_answer_0(chandle, ENOTSUP);
-		return;
-	}
-
+		async_answer_0(call, ENOTSUP);
+		return;
+	}
+
+	ipc_call_t data;
 	size_t len;
-	cap_call_handle_t data_chandle;
-	if (!async_data_read_receive(&data_chandle, &len)) {
-		async_answer_0(chandle, EINVAL);
+	if (!async_data_read_receive(&data, &len)) {
+		async_answer_0(call, EINVAL);
 		return;
 	}
 
 	if (len == 0) {
-		async_answer_0(data_chandle, EINVAL);
-		async_answer_0(chandle, EINVAL);
+		async_answer_0(&data, EINVAL);
+		async_answer_0(call, EINVAL);
 		return;
 	}
@@ -417,6 +417,6 @@
 	uint8_t *descriptor = malloc(len);
 	if (descriptor == NULL) {
-		async_answer_0(data_chandle, ENOMEM);
-		async_answer_0(chandle, ENOMEM);
+		async_answer_0(&data, ENOMEM);
+		async_answer_0(call, ENOMEM);
 		return;
 	}
@@ -430,16 +430,14 @@
 	if (rc != EOK) {
 		free(descriptor);
-		async_answer_0(data_chandle, rc);
-		async_answer_0(chandle, rc);
-		return;
-	}
-
-	async_data_read_finalize(data_chandle, descriptor, act_len);
-	async_answer_0(chandle, EOK);
+		async_answer_0(&data, rc);
+		async_answer_0(call, rc);
+		return;
+	}
+
+	async_data_read_finalize(&data, descriptor, act_len);
+	async_answer_0(call, EOK);
 
 	free(descriptor);
 }
-
-
 
 /**
