Index: uspace/drv/bus/usb/uhcirh/port.c
===================================================================
--- uspace/drv/bus/usb/uhcirh/port.c	(revision 205f0766b77093027f985751ecdae29d207d19d7)
+++ uspace/drv/bus/usb/uhcirh/port.c	(revision 90994fa1ec60bf10a68ef4f056183053240541f5)
@@ -100,5 +100,5 @@
 	port->number = number;
 	port->wait_period_usec = usec;
-	port->attached_device.handle = 0;
+	port->attached_device.fun = NULL;
 	port->attached_device.address = -1;
 	port->rh = rh;
@@ -169,5 +169,5 @@
 
 		/* Remove any old device */
-		if (instance->attached_device.handle) {
+		if (instance->attached_device.fun) {
 			usb_log_debug2("%s: Removing device.\n",
 			    instance->id_string);
@@ -261,6 +261,6 @@
 		ret = usb_hc_new_device_wrapper(port->rh, &port->hc_connection,
 		    speed, uhci_port_reset_enable, port->number, port,
-		    &port->attached_device.address,
-		    &port->attached_device.handle, NULL, NULL, NULL);
+		    &port->attached_device.address, NULL, NULL, NULL,
+		    &port->attached_device.fun);
 	} while (ret != EOK && ++count < 4);
 
@@ -274,5 +274,5 @@
 	usb_log_info("New device at port %u, address %d (handle %" PRIun ").\n",
 	    port->number, port->attached_device.address,
-	    port->attached_device.handle);
+	    port->attached_device.fun->handle);
 	return EOK;
 }
@@ -287,5 +287,5 @@
 	assert(port);
 	/* There is nothing to remove. */
-	if (port->attached_device.handle == 0) {
+	if (port->attached_device.fun == NULL) {
 		usb_log_warning("%s: Removed a ghost device.\n",
 		    port->id_string);
@@ -297,5 +297,5 @@
 
 	/* Stop driver first */
-	int ret = devman_remove_function(port->attached_device.handle);
+	int ret = ddf_fun_unbind(port->attached_device.fun);
 	if (ret != EOK) {
 		usb_log_error("%s: Failed to remove child function: %s.\n",
@@ -303,5 +303,6 @@
 		return ret;
 	}
-	port->attached_device.handle = 0;
+	ddf_fun_destroy(port->attached_device.fun);
+	port->attached_device.fun = NULL;
 
 	/* Driver stopped, free used address */
Index: uspace/drv/bus/usb/usbhub/port.c
===================================================================
--- uspace/drv/bus/usb/usbhub/port.c	(revision 205f0766b77093027f985751ecdae29d207d19d7)
+++ uspace/drv/bus/usb/usbhub/port.c	(revision 90994fa1ec60bf10a68ef4f056183053240541f5)
@@ -257,7 +257,7 @@
 		usb_log_debug("Removing device on port %zu.\n",
 		    port->port_number);
-		const int ret =
-		    devman_remove_function(port->attached_device.handle);
+		const int ret = ddf_fun_unbind(port->attached_device.fun);
 		if (ret == EOK) {
+			ddf_fun_destroy(port->attached_device.fun);
 			const int ret =
 			    usb_hc_unregister_device(&hub->connection,
@@ -269,9 +269,9 @@
 			}
 		} else {
-			usb_log_error("Failed to remove child function on port"
+			usb_log_error("Failed to unbind child function on port"
 			   " %zu: %s.\n", port->port_number, str_error(ret));
 		}
 		port->attached_device.address = -1;
-		port->attached_device.handle = 0;
+		port->attached_device.fun = NULL;
 		fibril_mutex_unlock(&port->mutex);
 		usb_log_info("Removed device on port %zu.\n",
@@ -418,11 +418,11 @@
 
 	usb_address_t new_address;
-	devman_handle_t child_handle;
+	ddf_fun_t *child_fun;
 
 	const int rc = usb_hc_new_device_wrapper(data->hub->usb_device->ddf_dev,
 	    &data->hub->connection, data->speed,
 	    enable_port_callback, (int) data->port->port_number,
-	    data->port, &new_address, &child_handle,
-	    NULL, NULL, NULL);
+	    data->port, &new_address, NULL,
+	    NULL, NULL, &child_fun);
 
 	if (rc != EOK) {
@@ -433,5 +433,5 @@
 
 	fibril_mutex_lock(&data->port->mutex);
-	data->port->attached_device.handle = child_handle;
+	data->port->attached_device.fun = child_fun;
 	data->port->attached_device.address = new_address;
 	fibril_mutex_unlock(&data->port->mutex);
@@ -440,5 +440,5 @@
 	    "address %d (handle %" PRIun ").\n",
 	    data->hub->usb_device->ddf_dev->name, data->port->port_number,
-	    new_address, child_handle);
+	    new_address, child_fun->handle);
 
 leave:
Index: uspace/drv/bus/usb/usbhub/port.h
===================================================================
--- uspace/drv/bus/usb/usbhub/port.h	(revision 205f0766b77093027f985751ecdae29d207d19d7)
+++ uspace/drv/bus/usb/usbhub/port.h	(revision 90994fa1ec60bf10a68ef4f056183053240541f5)
@@ -70,5 +70,5 @@
 	assert(port);
 	port->attached_device.address = -1;
-	port->attached_device.handle = 0;
+	port->attached_device.fun = NULL;
 	port->port_number = port_number;
 	port->control_pipe = control_pipe;
