Index: uspace/drv/root/root.c
===================================================================
--- uspace/drv/root/root.c	(revision bab63886b1d1a9c8c49900dc50c39ee2b0c64763)
+++ 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;
 }
 
