Index: uspace/lib/drv/generic/driver.c
===================================================================
--- uspace/lib/drv/generic/driver.c	(revision 659ca07ee874dd73f2c55ae0f068de4649cef844)
+++ uspace/lib/drv/generic/driver.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
@@ -607,7 +607,8 @@
 }
 
-/** Add single match ID to function.
+/** Add single match ID to inner function.
  *
  * Construct and add a single match ID to the specified function.
+ * Cannot be called when the function node is bound.
  *
  * @param fun			Function
@@ -621,4 +622,7 @@
 	match_id_t *match_id;
 	
+	assert(fun->bound == false);
+	assert(fun->ftype == fun_inner);
+	
 	match_id = create_match_id();
 	if (match_id == NULL)
@@ -640,6 +644,13 @@
 }
 
+/** Add exposed function to class.
+ *
+ * Must only be called when the function is bound.
+ */
 int add_function_to_class(function_t *fun, const char *class_name)
 {
+	assert(fun->bound == true);
+	assert(fun->ftype == fun_exposed);
+	
 	return devman_add_device_to_class(fun->handle, class_name);
 }
