Index: uspace/lib/usbdev/include/usb/dev/hub.h
===================================================================
--- uspace/lib/usbdev/include/usb/dev/hub.h	(revision feeac0d8cd6e0ce736779bc5f1dc701c5cf42ba6)
+++ uspace/lib/usbdev/include/usb/dev/hub.h	(revision ffa96c243f74449ac2805eb79c0595d3a4d5f9ba)
@@ -44,7 +44,7 @@
 #include <usb/hc.h>
 
-extern int usb_hc_new_device_wrapper(ddf_dev_t *, usb_hc_connection_t *, usb_speed_t,
-    int (*)(void *), void *, usb_address_t *, ddf_dev_ops_t *, void *,
-    ddf_fun_t **);
+extern int usb_hc_new_device_wrapper(ddf_dev_t *, ddf_fun_t *,
+    usb_hc_connection_t *, usb_speed_t, int (*)(void *), void *,
+    usb_address_t *, ddf_dev_ops_t *);
 
 /** Info about device attached to host controller.
Index: uspace/lib/usbdev/include/usb/dev/recognise.h
===================================================================
--- uspace/lib/usbdev/include/usb/dev/recognise.h	(revision feeac0d8cd6e0ce736779bc5f1dc701c5cf42ba6)
+++ uspace/lib/usbdev/include/usb/dev/recognise.h	(revision ffa96c243f74449ac2805eb79c0595d3a4d5f9ba)
@@ -52,5 +52,5 @@
 
 extern int usb_device_register_child_in_devman(usb_pipe_t *ctrl_pipe,
-    ddf_dev_t *, ddf_dev_ops_t *, void *, ddf_fun_t **);
+    ddf_dev_t *, ddf_fun_t *, ddf_dev_ops_t *);
 
 #endif
Index: uspace/lib/usbdev/src/hub.c
===================================================================
--- uspace/lib/usbdev/src/hub.c	(revision feeac0d8cd6e0ce736779bc5f1dc701c5cf42ba6)
+++ uspace/lib/usbdev/src/hub.c	(revision ffa96c243f74449ac2805eb79c0595d3a4d5f9ba)
@@ -155,10 +155,10 @@
  *	request or requests for descriptors when creating match ids).
  */
-int usb_hc_new_device_wrapper(ddf_dev_t *parent,
+int usb_hc_new_device_wrapper(ddf_dev_t *parent, ddf_fun_t *fun,
     usb_hc_connection_t *hc_conn, usb_speed_t dev_speed,
     int (*enable_port)(void *arg), void *arg, usb_address_t *assigned_address,
-    ddf_dev_ops_t *dev_ops, void *new_dev_data, ddf_fun_t **new_fun)
+    ddf_dev_ops_t *dev_ops)
 {
-	if ((new_fun == NULL) || (hc_conn == NULL))
+	if (hc_conn == NULL)
 		return EINVAL;
 
@@ -271,7 +271,6 @@
 	/* Register the device with devman. */
 	/* FIXME: create device_register that will get opened ctrl pipe. */
-	ddf_fun_t *child_fun;
 	rc = usb_device_register_child_in_devman(&ctrl_pipe,
-	    parent, dev_ops, new_dev_data, &child_fun);
+	    parent, fun, dev_ops);
 	if (rc != EOK) {
 		goto leave_release_free_address;
@@ -280,5 +279,5 @@
 	const usb_hub_attached_device_t new_device = {
 		.address = dev_addr,
-		.fun = child_fun,
+		.fun = fun,
 	};
 
@@ -288,5 +287,4 @@
 	if (rc != EOK) {
 		/* The child function is already created. */
-		ddf_fun_destroy(child_fun);
 		rc = EDESTADDRREQ;
 		goto leave_release_free_address;
@@ -296,6 +294,4 @@
 		*assigned_address = dev_addr;
 	}
-
-	*new_fun = child_fun;
 
 	rc = EOK;
Index: uspace/lib/usbdev/src/recognise.c
===================================================================
--- uspace/lib/usbdev/src/recognise.c	(revision feeac0d8cd6e0ce736779bc5f1dc701c5cf42ba6)
+++ uspace/lib/usbdev/src/recognise.c	(revision ffa96c243f74449ac2805eb79c0595d3a4d5f9ba)
@@ -33,7 +33,4 @@
  * Functions for recognition of attached devices.
  */
-
-/** XXX Fix this */
-#define _DDF_DATA_IMPLANT
 
 #include <sys/types.h>
@@ -318,11 +315,10 @@
  */
 int usb_device_register_child_in_devman(usb_pipe_t *ctrl_pipe,
-    ddf_dev_t *parent, ddf_dev_ops_t *dev_ops, void *dev_data,
-    ddf_fun_t **child_fun)
-{
-	if (child_fun == NULL || ctrl_pipe == NULL)
+    ddf_dev_t *parent, ddf_fun_t *fun, ddf_dev_ops_t *dev_ops)
+{
+	if (ctrl_pipe == NULL)
 		return EINVAL;
 	
-	if (!dev_ops && dev_data) {
+	if (!dev_ops && ddf_fun_data_get(fun) != NULL) {
 		usb_log_warning("Using standard fun ops with arbitrary "
 		    "driver data. This does not have to work.\n");
@@ -334,5 +330,4 @@
 	    (size_t) atomic_preinc(&device_name_index);
 	
-	ddf_fun_t *child = NULL;
 	int rc;
 	
@@ -348,16 +343,12 @@
 	}
 	
-	child = ddf_fun_create(parent, fun_inner, child_name);
-	if (child == NULL) {
-		rc = ENOMEM;
+	rc = ddf_fun_set_name(fun, child_name);
+	if (rc != EOK)
 		goto failure;
-	}
 	
 	if (dev_ops != NULL)
-		ddf_fun_set_ops(child, dev_ops);
+		ddf_fun_set_ops(fun, dev_ops);
 	else
-		ddf_fun_set_ops(child, &child_ops);
-	
-	ddf_fun_data_implant(child, dev_data);
+		ddf_fun_set_ops(fun, &child_ops);
 	
 	/*
@@ -365,7 +356,7 @@
 	 * driver data if there is no other data
 	 */
-	if (!dev_data) {
+	if (ddf_fun_data_get(fun) == NULL) {
 		usb_hub_attached_device_t *new_device = ddf_fun_data_alloc(
-		    child, sizeof(usb_hub_attached_device_t));
+		    fun, sizeof(usb_hub_attached_device_t));
 		if (!new_device) {
 			rc = ENOMEM;
@@ -374,5 +365,5 @@
 		
 		new_device->address = ctrl_pipe->wire->address;
-		new_device->fun = child;
+		new_device->fun = fun;
 	}
 	
@@ -384,5 +375,5 @@
 	
 	list_foreach(match_ids.ids, link, match_id_t, match_id) {
-		rc = ddf_fun_add_match_id(child, match_id->id, match_id->score);
+		rc = ddf_fun_add_match_id(fun, match_id->id, match_id->score);
 		if (rc != EOK) {
 			clean_match_ids(&match_ids);
@@ -393,17 +384,11 @@
 	clean_match_ids(&match_ids);
 	
-	rc = ddf_fun_bind(child);
+	rc = ddf_fun_bind(fun);
 	if (rc != EOK)
 		goto failure;
 	
-	*child_fun = child;
 	return EOK;
 	
 failure:
-	if (child != NULL) {
-		/* This takes care of match_id deallocation as well. */
-		ddf_fun_destroy(child);
-	}
-	
 	return rc;
 }
