Index: uspace/drv/root/root.c
===================================================================
--- uspace/drv/root/root.c	(revision cd0684db79e00ab134a988e66f3c68b8b17e2ffd)
+++ uspace/drv/root/root.c	(revision 659ca07ee874dd73f2c55ae0f068de4649cef844)
@@ -45,4 +45,5 @@
 #include <stdlib.h>
 #include <str.h>
+#include <str_error.h>
 #include <ctype.h>
 #include <macros.h>
@@ -84,12 +85,35 @@
 static int add_virtual_root_fun(device_t *dev)
 {
+	const char *name = VIRTUAL_FUN_NAME;
+	function_t *fun;
+	int rc;
+
 	printf(NAME ": adding new function for virtual devices.\n");
-	printf(NAME ":   function node is `%s' (%d %s)\n", VIRTUAL_FUN_NAME,
+	printf(NAME ":   function node is `%s' (%d %s)\n", name,
 	    VIRTUAL_FUN_MATCH_SCORE, VIRTUAL_FUN_MATCH_ID);
 
-	int res = register_function_wrapper(dev, VIRTUAL_FUN_NAME,
-	    VIRTUAL_FUN_MATCH_ID, VIRTUAL_FUN_MATCH_SCORE);
-
-	return res;
+	fun = ddf_fun_create(dev, fun_inner, name);
+	if (fun == NULL) {
+		printf(NAME ": error creating function %s\n", name);
+		return ENOMEM;
+	}
+
+	rc = ddf_fun_add_match_id(fun, VIRTUAL_FUN_MATCH_ID,
+	    VIRTUAL_FUN_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;
+	}
+
+	return EOK;
 }
 
@@ -104,5 +128,8 @@
 	char *platform;
 	size_t platform_size;
-	int res;
+
+	const char *name = PLATFORM_FUN_NAME;
+	function_t *fun;
+	int rc;
 
 	/* Get platform name from sysinfo. */
@@ -133,8 +160,26 @@
 	    PLATFORM_FUN_MATCH_SCORE, match_id);
 
-	res = register_function_wrapper(dev, PLATFORM_FUN_NAME,
-	    match_id, PLATFORM_FUN_MATCH_SCORE);
-
-	return res;
+	fun = ddf_fun_create(dev, 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, PLATFORM_FUN_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;
+	}
+
+	return EOK;
 }
 
Index: uspace/lib/drv/generic/driver.c
===================================================================
--- uspace/lib/drv/generic/driver.c	(revision cd0684db79e00ab134a988e66f3c68b8b17e2ffd)
+++ uspace/lib/drv/generic/driver.c	(revision 659ca07ee874dd73f2c55ae0f068de4649cef844)
@@ -632,56 +632,4 @@
 }
 
-
-/** Wrapper for child_device_register for devices with single match id.
- *
- * @param parent Parent device.
- * @param child_name Child device name.
- * @param child_match_id Child device match id.
- * @param child_match_score Child device match score.
- * @return Error code.
- */
-int register_function_wrapper(device_t *dev, const char *fun_name,
-    const char *match_id, int match_score)
-{
-	function_t *fun = NULL;
-	match_id_t *m_id = NULL;
-	int rc;
-	
-	fun = ddf_fun_create(dev, fun_inner, fun_name);
-	if (fun == NULL) {
-		rc = ENOMEM;
-		goto failure;
-	}
-	
-	m_id = create_match_id();
-	if (m_id == NULL) {
-		rc = ENOMEM;
-		goto failure;
-	}
-	
-	m_id->id = match_id;
-	m_id->score = match_score;
-	add_match_id(&fun->match_ids, m_id);
-	
-	rc = ddf_fun_bind(fun);
-	if (rc != EOK)
-		goto failure;
-	
-	return EOK;
-	
-failure:
-	if (m_id != NULL) {
-		m_id->id = NULL;
-		delete_match_id(m_id);
-	}
-	
-	if (fun != NULL) {
-		fun->name = NULL;
-		delete_function(fun);
-	}
-	
-	return rc;
-}
-
 /** Get default handler for client requests */
 remote_handler_t *function_get_default_handler(function_t *fun)
Index: uspace/lib/drv/include/driver.h
===================================================================
--- uspace/lib/drv/include/driver.h	(revision cd0684db79e00ab134a988e66f3c68b8b17e2ffd)
+++ uspace/lib/drv/include/driver.h	(revision 659ca07ee874dd73f2c55ae0f068de4649cef844)
@@ -166,7 +166,4 @@
 extern void *function_get_ops(function_t *, dev_inferface_idx_t);
 
-extern int register_function_wrapper(device_t *, const char *, const char *,
-    int);
-
 /*
  * Interrupts
