Index: uspace/drv/ns8250/ns8250.c
===================================================================
--- uspace/drv/ns8250/ns8250.c	(revision bab63886b1d1a9c8c49900dc50c39ee2b0c64763)
+++ uspace/drv/ns8250/ns8250.c	(revision 659ca07ee874dd73f2c55ae0f068de4649cef844)
@@ -761,11 +761,18 @@
 	}
 	
-	fun = create_function();
-	fun->ftype = fun_exposed;
-	fun->name = "a";
+	fun = ddf_fun_create(dev, fun_exposed, "a");
+	if (fun == NULL) {
+		printf(NAME ": error creating function.\n");
+		goto fail;
+	}
 	
 	/* Set device operations. */
 	fun->ops = &ns8250_dev_ops;
-	register_function(fun, dev);
+	rc = ddf_fun_bind(fun);
+	if (rc != EOK) {
+		printf(NAME ": error binding function.\n");
+		goto fail;
+	}
+
 	ns->fun = fun;
 	
@@ -777,4 +784,6 @@
 	return EOK;
 fail:
+	if (fun != NULL)
+		ddf_fun_destroy(fun);
 	if (need_cleanup)
 		ns8250_dev_cleanup(ns);
