Index: uspace/drv/test/test1/test1.c
===================================================================
--- uspace/drv/test/test1/test1.c	(revision deac215ea66a4a2ddb5875cf4489fe576060ec0d)
+++ uspace/drv/test/test1/test1.c	(revision 55896b6837c19f8fe505af9cbe31069aa02c168b)
@@ -42,4 +42,5 @@
 static int test1_add_device(ddf_dev_t *dev);
 static int test1_dev_remove(ddf_dev_t *dev);
+static int test1_dev_gone(ddf_dev_t *dev);
 static int test1_fun_online(ddf_fun_t *fun);
 static int test1_fun_offline(ddf_fun_t *fun);
@@ -48,4 +49,5 @@
 	.add_device = &test1_add_device,
 	.dev_remove = &test1_dev_remove,
+	.dev_gone = &test1_dev_gone,
 	.fun_online = &test1_fun_online,
 	.fun_offline = &test1_fun_offline
@@ -213,4 +215,19 @@
 }
 
+static int fun_unbind(ddf_fun_t *fun, const char *name)
+{
+	int rc;
+
+	ddf_msg(LVL_DEBUG, "fun_unbind(%p, '%s')", fun, name);
+	rc = ddf_fun_unbind(fun);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed unbinding function '%s'.", name);
+		return rc;
+	}
+
+	ddf_fun_destroy(fun);
+	return EOK;
+}
+
 static int test1_dev_remove(ddf_dev_t *dev)
 {
@@ -234,4 +251,32 @@
 	if (test1->child != NULL) {
 		rc = fun_remove(test1->child, "child");
+		if (rc != EOK)
+			return rc;
+	}
+
+	return EOK;
+}
+
+static int test1_dev_gone(ddf_dev_t *dev)
+{
+	test1_t *test1 = (test1_t *)dev->driver_data;
+	int rc;
+
+	ddf_msg(LVL_DEBUG, "test1_dev_remove(%p)", dev);
+
+	if (test1->fun_a != NULL) {
+		rc = fun_unbind(test1->fun_a, "a");
+		if (rc != EOK)
+			return rc;
+	}
+
+	if (test1->clone != NULL) {
+		rc = fun_unbind(test1->clone, "clone");
+		if (rc != EOK)
+			return rc;
+	}
+
+	if (test1->child != NULL) {
+		rc = fun_unbind(test1->child, "child");
 		if (rc != EOK)
 			return rc;
