Index: uspace/lib/drv/generic/remote_usbhc.c
===================================================================
--- uspace/lib/drv/generic/remote_usbhc.c	(revision 357a3021b85ee61052a29e8e5188756e124b7ba3)
+++ uspace/lib/drv/generic/remote_usbhc.c	(revision 3f0ef89d0f638430844072ff19f60a3128b9b5f2)
@@ -35,7 +35,8 @@
 #include <async.h>
 #include <errno.h>
+#include <assert.h>
 
 #include "usbhc_iface.h"
-#include "driver.h"
+#include "ddf/driver.h"
 
 #define USB_MAX_PAYLOAD_SIZE 1020
@@ -43,16 +44,16 @@
 #define HACK_MAX_PACKET_SIZE_INTERRUPT_IN 4
 
-static void remote_usbhc_interrupt_out(device_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbhc_interrupt_in(device_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbhc_bulk_out(device_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbhc_bulk_in(device_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbhc_control_write(device_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbhc_control_read(device_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbhc_reserve_default_address(device_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbhc_release_default_address(device_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbhc_request_address(device_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbhc_bind_address(device_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbhc_release_address(device_t *, void *, ipc_callid_t, ipc_call_t *);
-//static void remote_usbhc(device_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_interrupt_out(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_interrupt_in(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_bulk_out(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_bulk_in(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_control_write(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_control_read(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_reserve_default_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_release_default_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_request_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_bind_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbhc_release_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+//static void remote_usbhc(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
 
 /** Remote USB host controller interface operations. */
@@ -123,5 +124,5 @@
 }
 
-void remote_usbhc_reserve_default_address(device_t *device, void *iface,
+void remote_usbhc_reserve_default_address(ddf_fun_t *fun, void *iface,
     ipc_callid_t callid, ipc_call_t *call)
 {
@@ -135,10 +136,10 @@
 	usb_speed_t speed = DEV_IPC_GET_ARG1(*call);
 	
-	int rc = usb_iface->reserve_default_address(device, speed);
+	int rc = usb_iface->reserve_default_address(fun, speed);
 
 	async_answer_0(callid, rc);
 }
 
-void remote_usbhc_release_default_address(device_t *device, void *iface,
+void remote_usbhc_release_default_address(ddf_fun_t *fun, void *iface,
     ipc_callid_t callid, ipc_call_t *call)
 {
@@ -150,10 +151,10 @@
 	}
 
-	int rc = usb_iface->release_default_address(device);
+	int rc = usb_iface->release_default_address(fun);
 
 	async_answer_0(callid, rc);
 }
 
-void remote_usbhc_request_address(device_t *device, void *iface,
+void remote_usbhc_request_address(ddf_fun_t *fun, void *iface,
     ipc_callid_t callid, ipc_call_t *call)
 {
@@ -168,5 +169,5 @@
 
 	usb_address_t address;
-	int rc = usb_iface->request_address(device, speed, &address);
+	int rc = usb_iface->request_address(fun, speed, &address);
 	if (rc != EOK) {
 		async_answer_0(callid, rc);
@@ -176,5 +177,5 @@
 }
 
-void remote_usbhc_bind_address(device_t *device, void *iface,
+void remote_usbhc_bind_address(ddf_fun_t *fun, void *iface,
     ipc_callid_t callid, ipc_call_t *call)
 {
@@ -189,10 +190,10 @@
 	devman_handle_t handle = (devman_handle_t) DEV_IPC_GET_ARG2(*call);
 
-	int rc = usb_iface->bind_address(device, address, handle);
+	int rc = usb_iface->bind_address(fun, address, handle);
 
 	async_answer_0(callid, rc);
 }
 
-void remote_usbhc_release_address(device_t *device, void *iface,
+void remote_usbhc_release_address(ddf_fun_t *fun, void *iface,
     ipc_callid_t callid, ipc_call_t *call)
 {
@@ -206,5 +207,5 @@
 	usb_address_t address = (usb_address_t) DEV_IPC_GET_ARG1(*call);
 
-	int rc = usb_iface->release_address(device, address);
+	int rc = usb_iface->release_address(fun, address);
 
 	async_answer_0(callid, rc);
@@ -212,5 +213,5 @@
 
 
-static void callback_out(device_t *device,
+static void callback_out(ddf_fun_t *fun,
     int outcome, void *arg)
 {
@@ -222,5 +223,5 @@
 }
 
-static void callback_in(device_t *device,
+static void callback_in(ddf_fun_t *fun,
     int outcome, size_t actual_size, void *arg)
 {
@@ -255,5 +256,5 @@
  * @param transfer_func Transfer function (might be NULL).
  */
-static void remote_usbhc_out_transfer(device_t *device,
+static void remote_usbhc_out_transfer(ddf_fun_t *fun,
     ipc_callid_t callid, ipc_call_t *call,
     usbhc_iface_transfer_out_t transfer_func)
@@ -294,5 +295,5 @@
 	trans->size = len;
 
-	rc = transfer_func(device, target, max_packet_size,
+	rc = transfer_func(fun, target, max_packet_size,
 	    buffer, len,
 	    callback_out, trans);
@@ -311,5 +312,5 @@
  * @param transfer_func Transfer function (might be NULL).
  */
-static void remote_usbhc_in_transfer(device_t *device,
+static void remote_usbhc_in_transfer(ddf_fun_t *fun,
     ipc_callid_t callid, ipc_call_t *call,
     usbhc_iface_transfer_in_t transfer_func)
@@ -342,5 +343,5 @@
 	trans->size = len;
 
-	int rc = transfer_func(device, target, max_packet_size,
+	int rc = transfer_func(fun, target, max_packet_size,
 	    trans->buffer, len,
 	    callback_in, trans);
@@ -352,5 +353,5 @@
 }
 
-void remote_usbhc_interrupt_out(device_t *device, void *iface,
+void remote_usbhc_interrupt_out(ddf_fun_t *fun, void *iface,
     ipc_callid_t callid, ipc_call_t *call)
 {
@@ -358,9 +359,9 @@
 	assert(usb_iface != NULL);
 
-	return remote_usbhc_out_transfer(device, callid, call,
+	return remote_usbhc_out_transfer(fun, callid, call,
 	    usb_iface->interrupt_out);
 }
 
-void remote_usbhc_interrupt_in(device_t *device, void *iface,
+void remote_usbhc_interrupt_in(ddf_fun_t *fun, void *iface,
     ipc_callid_t callid, ipc_call_t *call)
 {
@@ -368,9 +369,9 @@
 	assert(usb_iface != NULL);
 
-	return remote_usbhc_in_transfer(device, callid, call,
+	return remote_usbhc_in_transfer(fun, callid, call,
 	    usb_iface->interrupt_in);
 }
 
-void remote_usbhc_bulk_out(device_t *device, void *iface,
+void remote_usbhc_bulk_out(ddf_fun_t *fun, void *iface,
     ipc_callid_t callid, ipc_call_t *call)
 {
@@ -378,9 +379,9 @@
 	assert(usb_iface != NULL);
 
-	return remote_usbhc_out_transfer(device, callid, call,
+	return remote_usbhc_out_transfer(fun, callid, call,
 	    usb_iface->bulk_out);
 }
 
-void remote_usbhc_bulk_in(device_t *device, void *iface,
+void remote_usbhc_bulk_in(ddf_fun_t *fun, void *iface,
     ipc_callid_t callid, ipc_call_t *call)
 {
@@ -388,9 +389,9 @@
 	assert(usb_iface != NULL);
 
-	return remote_usbhc_in_transfer(device, callid, call,
+	return remote_usbhc_in_transfer(fun, callid, call,
 	    usb_iface->bulk_in);
 }
 
-void remote_usbhc_control_write(device_t *device, void *iface,
+void remote_usbhc_control_write(ddf_fun_t *fun, void *iface,
 ipc_callid_t callid, ipc_call_t *call)
 {
@@ -444,5 +445,5 @@
 	trans->size = data_buffer_len;
 
-	rc = usb_iface->control_write(device, target, max_packet_size,
+	rc = usb_iface->control_write(fun, target, max_packet_size,
 	    setup_packet, setup_packet_len,
 	    data_buffer, data_buffer_len,
@@ -456,5 +457,5 @@
 
 
-void remote_usbhc_control_read(device_t *device, void *iface,
+void remote_usbhc_control_read(ddf_fun_t *fun, void *iface,
 ipc_callid_t callid, ipc_call_t *call)
 {
@@ -509,5 +510,5 @@
 	}
 
-	rc = usb_iface->control_read(device, target, max_packet_size,
+	rc = usb_iface->control_read(fun, target, max_packet_size,
 	    setup_packet, setup_packet_len,
 	    trans->buffer, trans->size,
