Index: uspace/drv/isa/isa.c
===================================================================
--- uspace/drv/isa/isa.c	(revision 97a62fec5ae8981a95bc5036a2fda4084d6bea01)
+++ uspace/drv/isa/isa.c	(revision cd0684db79e00ab134a988e66f3c68b8b17e2ffd)
@@ -44,4 +44,5 @@
 #include <stdlib.h>
 #include <str.h>
+#include <str_error.h>
 #include <ctype.h>
 #include <macros.h>
@@ -324,4 +325,5 @@
 	int score = 0;
 	char *end = NULL;
+	int rc;
 
 	val = skip_spaces(val);
@@ -334,11 +336,4 @@
 	}
 
-	match_id_t *match_id = create_match_id();
-	if (match_id == NULL) {
-		printf(NAME " : failed to allocate match id for function %s.\n",
-		    fun->fnode->name);
-		return;
-	}
-
 	val = skip_spaces(end);
 	get_match_id(&id, val);
@@ -346,14 +341,13 @@
 		printf(NAME " : error - could not read match id for "
 		    "function %s.\n", fun->fnode->name);
-		delete_match_id(match_id);
 		return;
 	}
-
-	match_id->id = id;
-	match_id->score = score;
 
 	printf(NAME ": adding match id '%s' with score %d to function %s\n", id,
 	    score, fun->fnode->name);
-	add_match_id(&fun->fnode->match_ids, match_id);
+
+	rc = ddf_fun_add_match_id(fun->fnode, id, score);
+	if (rc != EOK)
+		printf(NAME ": error adding match ID: %s\n", str_error(rc));
 }
 
Index: uspace/drv/pciintel/pci.c
===================================================================
--- uspace/drv/pciintel/pci.c	(revision 97a62fec5ae8981a95bc5036a2fda4084d6bea01)
+++ uspace/drv/pciintel/pci.c	(revision cd0684db79e00ab134a988e66f3c68b8b17e2ffd)
@@ -45,4 +45,5 @@
 #include <ctype.h>
 #include <macros.h>
+#include <str_error.h>
 
 #include <driver.h>
@@ -217,14 +218,19 @@
 void pci_fun_create_match_ids(pci_fun_t *fun)
 {
-	match_id_t *match_id = NULL;
 	char *match_id_str;
-	
-	match_id = create_match_id();
-	if (match_id != NULL) {
-		asprintf(&match_id_str, "pci/ven=%04x&dev=%04x",
-		    fun->vendor_id, fun->device_id);
-		match_id->id = match_id_str;
-		match_id->score = 90;
-		add_match_id(&fun->fnode->match_ids, match_id);
+	int rc;
+	
+	asprintf(&match_id_str, "pci/ven=%04x&dev=%04x",
+	    fun->vendor_id, fun->device_id);
+
+	if (match_id_str == NULL) {
+		printf(NAME ": out of memory creating match ID.\n");
+		return;
+	}
+
+	rc = ddf_fun_add_match_id(fun->fnode, match_id_str, 90);
+	if (rc != EOK) {
+		printf(NAME ": error adding match ID: %s\n",
+		    str_error(rc));
 	}
 	
Index: uspace/drv/rootvirt/rootvirt.c
===================================================================
--- uspace/drv/rootvirt/rootvirt.c	(revision 97a62fec5ae8981a95bc5036a2fda4084d6bea01)
+++ uspace/drv/rootvirt/rootvirt.c	(revision cd0684db79e00ab134a988e66f3c68b8b17e2ffd)
@@ -80,19 +80,34 @@
 static int rootvirt_add_fun(device_t *vdev, virtual_function_t *vfun)
 {
+	function_t *fun;
+	int rc;
+
 	printf(NAME ": registering function `%s' (match \"%s\")\n",
 	    vfun->name, vfun->match_id);
 
-	int rc = register_function_wrapper(vdev, vfun->name,
-	    vfun->match_id, 10);
-
-	if (rc == EOK) {
-		printf(NAME ": registered child device `%s'\n",
-		    vfun->name);
-	} else {
-		printf(NAME ": failed to register child device `%s': %s\n",
-		    vfun->name, str_error(rc));
+	fun = ddf_fun_create(vdev, fun_inner, vfun->name);
+	if (fun == NULL) {
+		printf(NAME ": error creating function %s\n", vfun->name);
+		return ENOMEM;
 	}
 
-	return rc;
+	rc = ddf_fun_add_match_id(fun, vfun->match_id, 10);
+	if (rc != EOK) {
+		printf(NAME ": error adding match IDs to function %s\n",
+		    vfun->name);
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+
+	rc = ddf_fun_bind(fun);
+	if (rc != EOK) {
+		printf(NAME ": error binding function %s: %s\n", vfun->name,
+		    str_error(rc));
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+
+	printf(NAME ": registered child device `%s'\n", vfun->name);
+	return EOK;
 }
 
Index: uspace/drv/test1/test1.c
===================================================================
--- uspace/drv/test1/test1.c	(revision 97a62fec5ae8981a95bc5036a2fda4084d6bea01)
+++ uspace/drv/test1/test1.c	(revision cd0684db79e00ab134a988e66f3c68b8b17e2ffd)
@@ -55,19 +55,35 @@
  * @param score Device match score.
  */
-static void register_fun_verbose(device_t *parent, const char *message,
+static int register_fun_verbose(device_t *parent, const char *message,
     const char *name, const char *match_id, int match_score)
 {
-	printf(NAME ": registering child device `%s': %s.\n",
-	   name, message);
+	function_t *fun;
+	int rc;
 
-	int rc = register_function_wrapper(parent, name,
-	    match_id, match_score);
+	printf(NAME ": registering function `%s': %s.\n", name, message);
 
-	if (rc == EOK) {
-		printf(NAME ": registered function `%s'.\n", name);
-	} else {
-		printf(NAME ": failed to register function `%s' (%s).\n",
-		    name, str_error(rc));
+	fun = ddf_fun_create(parent, fun_inner, name);
+	if (fun == NULL) {
+		printf(NAME ": error creating function %s\n", name);
+		return ENOMEM;
 	}
+
+	rc = ddf_fun_add_match_id(fun, match_id, match_score);
+	if (rc != EOK) {
+		printf(NAME ": error adding match IDs to function %s\n", name);
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+
+	rc = ddf_fun_bind(fun);
+	if (rc != EOK) {
+		printf(NAME ": error binding function %s: %s\n", name,
+		    str_error(rc));
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+
+	printf(NAME ": registered child device `%s'\n", name);
+	return EOK;
 }
 
@@ -115,8 +131,8 @@
 		add_function_to_class(fun_a, "virt-null");
 	} else if (str_cmp(dev->name, "test1") == 0) {
-		register_fun_verbose(dev, "cloning myself ;-)", "clone",
+		(void) register_fun_verbose(dev, "cloning myself ;-)", "clone",
 		    "virtual&test1", 10);
 	} else if (str_cmp(dev->name, "clone") == 0) {
-		register_fun_verbose(dev, "run by the same task", "child",
+		(void) register_fun_verbose(dev, "run by the same task", "child",
 		    "virtual&test1&child", 10);
 	}
Index: uspace/drv/test2/test2.c
===================================================================
--- uspace/drv/test2/test2.c	(revision 97a62fec5ae8981a95bc5036a2fda4084d6bea01)
+++ uspace/drv/test2/test2.c	(revision cd0684db79e00ab134a988e66f3c68b8b17e2ffd)
@@ -57,19 +57,35 @@
  * @param score Device match score.
  */
-static void register_child_verbose(device_t *parent, const char *message,
+static int register_fun_verbose(device_t *parent, const char *message,
     const char *name, const char *match_id, int match_score)
 {
-	printf(NAME ": registering child device `%s': %s.\n",
-	   name, message);
+	function_t *fun;
+	int rc;
 
-	int rc = register_function_wrapper(parent, name,
-	    match_id, match_score);
+	printf(NAME ": registering function `%s': %s.\n", name, message);
 
-	if (rc == EOK) {
-		printf(NAME ": registered child device `%s'.\n", name);
-	} else {
-		printf(NAME ": failed to register child `%s' (%s).\n",
-		    name, str_error(rc));
+	fun = ddf_fun_create(parent, fun_inner, name);
+	if (fun == NULL) {
+		printf(NAME ": error creating function %s\n", name);
+		return ENOMEM;
 	}
+
+	rc = ddf_fun_add_match_id(fun, match_id, match_score);
+	if (rc != EOK) {
+		printf(NAME ": error adding match IDs to function %s\n", name);
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+
+	rc = ddf_fun_bind(fun);
+	if (rc != EOK) {
+		printf(NAME ": error binding function %s: %s\n", name,
+		    str_error(rc));
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+
+	printf(NAME ": registered child device `%s'\n", name);
+	return EOK;
 }
 
@@ -87,7 +103,7 @@
 	async_usleep(1000);
 
-	register_child_verbose(dev, "child driven by the same task",
+	(void) register_fun_verbose(dev, "child driven by the same task",
 	    "child", "virtual&test2", 10);
-	register_child_verbose(dev, "child driven by test1",
+	(void) register_fun_verbose(dev, "child driven by test1",
 	    "test1", "virtual&test1", 10);
 
@@ -122,5 +138,5 @@
 		fibril_add_ready(postpone);
 	} else {
-		register_child_verbose(dev, "child without available driver",
+		(void) register_fun_verbose(dev, "child without available driver",
 		    "ERROR", "non-existent.match.id", 10);
 	}
