Index: uspace/srv/devman/fun.c
===================================================================
--- uspace/srv/devman/fun.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ uspace/srv/devman/fun.c	(revision 1033d1fbada20027b76c48da5df9154d3a23932b)
@@ -58,5 +58,5 @@
 	if (fun == NULL)
 		return NULL;
-	
+
 	fun->state = FUN_INIT;
 	atomic_set(&fun->refcnt, 0);
@@ -64,5 +64,5 @@
 	link_initialize(&fun->dev_functions);
 	list_initialize(&fun->match_ids.ids);
-	
+
 	return fun;
 }
@@ -76,5 +76,5 @@
 	assert(fun->dev == NULL);
 	assert(fun->child == NULL);
-	
+
 	clean_match_ids(&fun->match_ids);
 	free(fun->name);
@@ -125,13 +125,13 @@
 {
 	fun_node_t *fun;
-	
+
 	assert(fibril_rwlock_is_locked(&tree->rwlock));
-	
+
 	ht_link_t *link = hash_table_find(&tree->devman_functions, &handle);
 	if (link == NULL)
 		return NULL;
-	
+
 	fun = hash_table_get_inst(link, fun_node_t, devman_fun);
-	
+
 	return fun;
 }
@@ -146,13 +146,13 @@
 {
 	fun_node_t *fun = NULL;
-	
+
 	fibril_rwlock_read_lock(&tree->rwlock);
-	
+
 	fun = find_fun_node_no_lock(tree, handle);
 	if (fun != NULL)
 		fun_add_ref(fun);
-	
+
 	fibril_rwlock_read_unlock(&tree->rwlock);
-	
+
 	return fun;
 }
@@ -170,9 +170,9 @@
 	assert(fibril_rwlock_is_write_locked(&tree->rwlock));
 	assert(fun->name != NULL);
-	
+
 	size_t pathsize = (str_size(fun->name) + 1);
 	if (parent != NULL)
 		pathsize += str_size(parent->pathname) + 1;
-	
+
 	fun->pathname = (char *) malloc(pathsize);
 	if (fun->pathname == NULL) {
@@ -180,5 +180,5 @@
 		return false;
 	}
-	
+
 	if (parent != NULL) {
 		str_cpy(fun->pathname, pathsize, parent->pathname);
@@ -188,5 +188,5 @@
 		str_cpy(fun->pathname, pathsize, fun->name);
 	}
-	
+
 	return true;
 }
@@ -209,5 +209,5 @@
 
 	fibril_rwlock_read_lock(&tree->rwlock);
-	
+
 	fun_node_t *fun = tree->root_node;
 	fun_add_ref(fun);
@@ -219,5 +219,5 @@
 	char *next_path_elem = NULL;
 	bool cont = (rel_path[1] != '\0');
-	
+
 	while (cont && fun != NULL) {
 		next_path_elem  = get_path_elem_end(rel_path + 1);
@@ -228,9 +228,9 @@
 			cont = false;
 		}
-		
+
 		fun_node_t *cfun = find_node_child(tree, fun, rel_path + 1);
 		fun_del_ref(fun);
 		fun = cfun;
-		
+
 		if (cont) {
 			/* Restore the original path. */
@@ -239,7 +239,7 @@
 		rel_path = next_path_elem;
 	}
-	
+
 	fibril_rwlock_read_unlock(&tree->rwlock);
-	
+
 	return fun;
 }
@@ -299,7 +299,7 @@
 {
 	dev_node_t *dev;
-	
+
 	fibril_rwlock_write_lock(&device_tree.rwlock);
-	
+
 	if (fun->state == FUN_ON_LINE) {
 		fibril_rwlock_write_unlock(&device_tree.rwlock);
@@ -308,5 +308,5 @@
 		return EOK;
 	}
-	
+
 	if (fun->ftype == fun_inner) {
 		dev = create_dev_node();
@@ -315,18 +315,18 @@
 			return ENOMEM;
 		}
-		
+
 		insert_dev_node(&device_tree, dev, fun);
 		dev_add_ref(dev);
 	}
-	
+
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "devman_add_function(fun=\"%s\")", fun->pathname);
-	
+
 	if (fun->ftype == fun_inner) {
 		dev = fun->child;
 		assert(dev != NULL);
-		
+
 		/* Give one reference over to assign_driver_fibril(). */
 		dev_add_ref(dev);
-		
+
 		/*
 		 * Try to find a suitable driver and assign it to the device.  We do
@@ -347,8 +347,8 @@
 	} else
 		loc_register_tree_function(fun, &device_tree);
-	
+
 	fun->state = FUN_ON_LINE;
 	fibril_rwlock_write_unlock(&device_tree.rwlock);
-	
+
 	return EOK;
 }
@@ -357,7 +357,7 @@
 {
 	errno_t rc;
-	
+
 	fibril_rwlock_write_lock(&device_tree.rwlock);
-	
+
 	if (fun->state == FUN_OFF_LINE) {
 		fibril_rwlock_write_unlock(&device_tree.rwlock);
@@ -366,16 +366,16 @@
 		return EOK;
 	}
-	
+
 	if (fun->ftype == fun_inner) {
 		log_msg(LOG_DEFAULT, LVL_DEBUG, "Offlining inner function %s.",
 		    fun->pathname);
-		
+
 		if (fun->child != NULL) {
 			dev_node_t *dev = fun->child;
 			device_state_t dev_state;
-			
+
 			dev_add_ref(dev);
 			dev_state = dev->state;
-			
+
 			fibril_rwlock_write_unlock(&device_tree.rwlock);
 
@@ -388,5 +388,5 @@
 				}
 			}
-			
+
 			/* Verify that driver removed all functions */
 			fibril_rwlock_read_lock(&device_tree.rwlock);
@@ -396,14 +396,14 @@
 				return EIO;
 			}
-			
+
 			driver_t *driver = dev->drv;
 			fibril_rwlock_read_unlock(&device_tree.rwlock);
-			
+
 			if (driver)
 				detach_driver(&device_tree, dev);
-			
+
 			fibril_rwlock_write_lock(&device_tree.rwlock);
 			remove_dev_node(&device_tree, dev);
-			
+
 			/* Delete ref created when node was inserted */
 			dev_del_ref(dev);
@@ -419,11 +419,11 @@
 			return EIO;
 		}
-		
+
 		fun->service_id = 0;
 	}
-	
+
 	fun->state = FUN_OFF_LINE;
 	fibril_rwlock_write_unlock(&device_tree.rwlock);
-	
+
 	return EOK;
 }
