Index: uspace/lib/usbdev/src/devdrv.c
===================================================================
--- uspace/lib/usbdev/src/devdrv.c	(revision 80136376d214f46fb63a3d7a552c74395a0128b1)
+++ uspace/lib/usbdev/src/devdrv.c	(revision a801688bbb63ce8e1f39927867b7500c306a8b52)
@@ -105,5 +105,5 @@
 	if (dev == NULL) {
 		usb_log_error("USB device `%s' structure allocation failed.\n",
-		    gen_dev->name);
+		    ddf_dev_get_name(gen_dev));
 		return ENOMEM;
 	}
@@ -114,5 +114,5 @@
 	if (rc != EOK) {
 		usb_log_error("USB device `%s' init failed (%s): %s.\n",
-		    gen_dev->name, err_msg, str_error(rc));
+		    ddf_dev_get_name(gen_dev), err_msg, str_error(rc));
 		return rc;
 	}
@@ -139,5 +139,5 @@
 		return ENOTSUP;
 	/* Just tell the driver to stop whatever it is doing */
-	usb_device_t *usb_dev = gen_dev->driver_data;
+	usb_device_t *usb_dev = ddf_dev_data_get(gen_dev);
 	const int ret = driver->ops->device_rem(usb_dev);
 	if (ret != EOK)
@@ -160,5 +160,5 @@
 	if (driver->ops->device_gone == NULL)
 		return ENOTSUP;
-	usb_device_t *usb_dev = gen_dev->driver_data;
+	usb_device_t *usb_dev = ddf_dev_data_get(gen_dev);
 	const int ret = driver->ops->device_gone(usb_dev);
 	if (ret == EOK)
@@ -415,5 +415,5 @@
 	usb_address_t address;
 
-	int rc = usb_get_info_by_handle(ddf_dev->handle,
+	int rc = usb_get_info_by_handle(ddf_dev_get_handle(ddf_dev),
 	    &hc_handle, &address, &usb_dev->interface_no);
 	if (rc != EOK) {
Index: uspace/lib/usbdev/src/devpoll.c
===================================================================
--- uspace/lib/usbdev/src/devpoll.c	(revision 80136376d214f46fb63a3d7a552c74395a0128b1)
+++ uspace/lib/usbdev/src/devpoll.c	(revision a801688bbb63ce8e1f39927867b7500c306a8b52)
@@ -80,5 +80,5 @@
 		usb_log_debug("Poll%p: started polling of `%s' - " \
 		    "interface %d (%s,%d,%d), %zuB/%zu.\n",
-		    data, data->dev->ddf_dev->name,
+		    data, ddf_dev_get_name(data->dev->ddf_dev),
 		    (int) mapping->interface->interface_number,
 		    usb_str_class(mapping->interface->interface_class),
@@ -159,8 +159,10 @@
 		if (failed) {
 			usb_log_error("Polling of device `%s' terminated: "
-			    "recurring failures.\n", data->dev->ddf_dev->name);
+			    "recurring failures.\n", ddf_dev_get_name(
+			    data->dev->ddf_dev));
 		} else {
 			usb_log_debug("Polling of device `%s' terminated: "
-			    "driver request.\n", data->dev->ddf_dev->name);
+			    "driver request.\n", ddf_dev_get_name(
+			    data->dev->ddf_dev));
 		}
 	}
Index: uspace/lib/usbdev/src/hub.c
===================================================================
--- uspace/lib/usbdev/src/hub.c	(revision 80136376d214f46fb63a3d7a552c74395a0128b1)
+++ uspace/lib/usbdev/src/hub.c	(revision a801688bbb63ce8e1f39927867b7500c306a8b52)
@@ -63,5 +63,5 @@
 		return EBADMEM;
 	return usb_hc_bind_address(connection,
-	    attached_device->address, attached_device->fun->handle);
+	    attached_device->address, ddf_fun_get_handle(attached_device->fun));
 }
 
@@ -287,7 +287,4 @@
 	rc = usb_hub_register_device(hc_conn, &new_device);
 	if (rc != EOK) {
-		/* We know nothing about that data. */
-		if (new_dev_data)
-			child_fun->driver_data = NULL;
 		/* The child function is already created. */
 		ddf_fun_destroy(child_fun);
Index: uspace/lib/usbdev/src/recognise.c
===================================================================
--- uspace/lib/usbdev/src/recognise.c	(revision 80136376d214f46fb63a3d7a552c74395a0128b1)
+++ uspace/lib/usbdev/src/recognise.c	(revision a801688bbb63ce8e1f39927867b7500c306a8b52)
@@ -33,4 +33,7 @@
  * Functions for recognition of attached devices.
  */
+
+/** XXX Fix this */
+#define _DDF_DATA_IMPLANT
 
 #include <sys/types.h>
@@ -352,9 +355,10 @@
 	
 	if (dev_ops != NULL)
-		child->ops = dev_ops;
+		ddf_fun_set_ops(child, dev_ops);
 	else
-		child->ops = &child_ops;
-	
-	child->driver_data = dev_data;
+		ddf_fun_set_ops(child, &child_ops);
+	
+	ddf_fun_data_implant(child, dev_data);
+	
 	/*
 	 * Store the attached device in fun
@@ -373,7 +377,20 @@
 	}
 	
-	rc = usb_device_create_match_ids(ctrl_pipe, &child->match_ids);
+	match_id_list_t match_ids;
+	init_match_ids(&match_ids);
+	rc = usb_device_create_match_ids(ctrl_pipe, &match_ids);
 	if (rc != EOK)
 		goto failure;
+	
+	list_foreach(match_ids.ids, id_link) {
+		match_id_t *match_id = list_get_instance(id_link, match_id_t, link);
+		rc = ddf_fun_add_match_id(child, match_id->id, match_id->score);
+		if (rc != EOK) {
+			clean_match_ids(&match_ids);
+			goto failure;
+		}
+	}
+	
+	clean_match_ids(&match_ids);
 	
 	rc = ddf_fun_bind(child);
@@ -386,8 +403,4 @@
 failure:
 	if (child != NULL) {
-		/* We know nothing about the data if it came from outside. */
-		if (dev_data)
-			child->driver_data = NULL;
-		
 		/* This takes care of match_id deallocation as well. */
 		ddf_fun_destroy(child);
