Index: uspace/lib/graph/graph.c
===================================================================
--- uspace/lib/graph/graph.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
+++ uspace/lib/graph/graph.c	(revision f1380b76772fb5d1aa03637b5e57bd9b929fea61)
@@ -91,14 +91,14 @@
 	snprintf(node, LOC_NAME_MAXLEN, "%s%zu/%s%zu", NAMESPACE,
 	    namespace_idx, VISUALIZER_NAME, visualizer_idx++);
-	
+
 	category_id_t cat;
 	errno_t rc = loc_category_get_id("visualizer", &cat, 0);
 	if (rc != EOK)
 		return rc;
-	
+
 	rc = loc_service_register(node, &vs->reg_svc_handle);
 	if (rc != EOK)
 		return rc;
-	
+
 	rc = loc_service_add_to_cat(vs->reg_svc_handle, cat);
 	if (rc != EOK) {
@@ -106,9 +106,9 @@
 		return rc;
 	}
-	
+
 	fibril_mutex_lock(&visualizer_list_mtx);
 	list_append(&vs->link, &visualizer_list);
 	fibril_mutex_unlock(&visualizer_list_mtx);
-	
+
 	return rc;
 }
@@ -119,14 +119,14 @@
 	snprintf(node, LOC_NAME_MAXLEN, "%s%zu/%s%zu", NAMESPACE,
 	    namespace_idx, RENDERER_NAME, renderer_idx++);
-	
+
 	category_id_t cat;
 	errno_t rc = loc_category_get_id("renderer", &cat, 0);
 	if (rc != EOK)
 		return rc;
-	
+
 	rc = loc_service_register(node, &rnd->reg_svc_handle);
 	if (rc != EOK)
 		return rc;
-	
+
 	rc = loc_service_add_to_cat(rnd->reg_svc_handle, cat);
 	if (rc != EOK) {
@@ -134,9 +134,9 @@
 		return rc;
 	}
-	
+
 	fibril_mutex_lock(&renderer_list_mtx);
 	list_append(&rnd->link, &renderer_list);
 	fibril_mutex_unlock(&renderer_list_mtx);
-	
+
 	return rc;
 }
@@ -145,7 +145,7 @@
 {
 	visualizer_t *vs = NULL;
-	
+
 	fibril_mutex_lock(&visualizer_list_mtx);
-	
+
 	list_foreach(visualizer_list, link, visualizer_t, vcur) {
 		if (vcur->reg_svc_handle == handle) {
@@ -154,7 +154,7 @@
 		}
 	}
-	
+
 	fibril_mutex_unlock(&visualizer_list_mtx);
-	
+
 	return vs;
 }
@@ -163,7 +163,7 @@
 {
 	renderer_t *rnd = NULL;
-	
+
 	fibril_mutex_lock(&renderer_list_mtx);
-	
+
 	list_foreach(renderer_list, link, renderer_t, rcur) {
 		if (rcur->reg_svc_handle == handle) {
@@ -172,7 +172,7 @@
 		}
 	}
-	
+
 	fibril_mutex_unlock(&renderer_list_mtx);
-	
+
 	return rnd;
 }
@@ -184,5 +184,5 @@
 	list_remove(&vs->link);
 	fibril_mutex_unlock(&visualizer_list_mtx);
-	
+
 	return rc;
 }
@@ -194,5 +194,5 @@
 	list_remove(&rnd->link);
 	fibril_mutex_unlock(&renderer_list_mtx);
-	
+
 	return rc;
 }
@@ -207,5 +207,5 @@
 	assert(vs->cells.data == NULL);
 	assert(vs->dev_ctx == NULL);
-	
+
 	free(vs);
 }
@@ -215,5 +215,5 @@
 	// TODO
 	assert(atomic_get(&rnd->ref_cnt) == 0);
-	
+
 	free(rnd);
 }
@@ -224,5 +224,5 @@
 	errno_t ret = async_req_2_0(exch, VISUALIZER_MODE_CHANGE, handle, mode_idx);
 	async_exchange_end(exch);
-	
+
 	return ret;
 }
@@ -233,7 +233,7 @@
 	errno_t ret = async_req_1_0(exch, VISUALIZER_DISCONNECT, handle);
 	async_exchange_end(exch);
-	
+
 	async_hangup(sess);
-	
+
 	return ret;
 }
@@ -255,13 +255,13 @@
 		}
 	}
-	
+
 	/* Driver might also deallocate resources for the current mode. */
 	errno_t rc = vs->ops.yield(vs);
-	
+
 	/* Now that the driver was given a chance to deallocate resources,
 	 * current mode can be unset. */
 	if (vs->mode_set)
 		vs->mode_set = false;
-	
+
 	async_answer_0(iid, rc);
 }
@@ -271,5 +271,5 @@
 	ipc_callid_t callid;
 	size_t len;
-	
+
 	if (!async_data_read_receive(&callid, &len)) {
 		async_answer_0(callid, EREFUSED);
@@ -277,12 +277,12 @@
 		return;
 	}
-	
+
 	fibril_mutex_lock(&vs->mode_mtx);
 	link_t *link = list_nth(&vs->modes, IPC_GET_ARG1(*icall));
-	
+
 	if (link != NULL) {
 		vslmode_list_element_t *mode_elem =
 		    list_get_instance(link, vslmode_list_element_t, link);
-		
+
 		errno_t rc = async_data_read_finalize(callid, &mode_elem->mode, len);
 		async_answer_0(iid, rc);
@@ -291,5 +291,5 @@
 		async_answer_0(iid, ENOENT);
 	}
-	
+
 	fibril_mutex_unlock(&vs->mode_mtx);
 }
@@ -299,5 +299,5 @@
 	ipc_callid_t callid;
 	size_t len;
-	
+
 	if (!async_data_read_receive(&callid, &len)) {
 		async_answer_0(callid, EREFUSED);
@@ -305,8 +305,8 @@
 		return;
 	}
-	
+
 	fibril_mutex_lock(&vs->mode_mtx);
 	vslmode_list_element_t *mode_elem = NULL;
-	
+
 	list_foreach(vs->modes, link, vslmode_list_element_t, cur) {
 		if (cur->mode.index == vs->def_mode_idx) {
@@ -315,5 +315,5 @@
 		}
 	}
-	
+
 	if (mode_elem != NULL) {
 		errno_t rc = async_data_read_finalize(callid, &mode_elem->mode, len);
@@ -324,5 +324,5 @@
 		async_answer_0(iid, ENOENT);
 	}
-	
+
 	fibril_mutex_unlock(&vs->mode_mtx);
 }
@@ -332,5 +332,5 @@
 	ipc_callid_t callid;
 	size_t len;
-	
+
 	if (!async_data_read_receive(&callid, &len)) {
 		async_answer_0(callid, EREFUSED);
@@ -338,5 +338,5 @@
 		return;
 	}
-	
+
 	if (vs->mode_set) {
 		errno_t rc = async_data_read_finalize(callid, &vs->cur_mode, len);
@@ -352,5 +352,5 @@
 	ipc_callid_t callid;
 	size_t len;
-	
+
 	if (!async_data_read_receive(&callid, &len)) {
 		async_answer_0(callid, EREFUSED);
@@ -358,10 +358,10 @@
 		return;
 	}
-	
+
 	sysarg_t mode_idx = IPC_GET_ARG1(*icall);
-	
+
 	fibril_mutex_lock(&vs->mode_mtx);
 	vslmode_list_element_t *mode_elem = NULL;
-	
+
 	list_foreach(vs->modes, link, vslmode_list_element_t, cur) {
 		if (cur->mode.index == mode_idx) {
@@ -370,5 +370,5 @@
 		}
 	}
-	
+
 	if (mode_elem != NULL) {
 		errno_t rc = async_data_read_finalize(callid, &mode_elem->mode, len);
@@ -378,5 +378,5 @@
 		async_answer_0(iid, ENOENT);
 	}
-	
+
 	fibril_mutex_unlock(&vs->mode_mtx);
 }
@@ -387,5 +387,5 @@
 	size_t size;
 	unsigned int flags;
-	
+
 	/* Retrieve the shared cell storage for the new mode. */
 	if (!async_share_out_receive(&callid, &size, &flags)) {
@@ -394,13 +394,13 @@
 		return;
 	}
-	
+
 	/* Retrieve mode index and version. */
 	sysarg_t mode_idx = IPC_GET_ARG1(*icall);
 	sysarg_t mode_version = IPC_GET_ARG2(*icall);
-	
+
 	/* Find mode in the list. */
 	fibril_mutex_lock(&vs->mode_mtx);
 	vslmode_list_element_t *mode_elem = NULL;
-	
+
 	list_foreach(vs->modes, link, vslmode_list_element_t, cur) {
 		if (cur->mode.index == mode_idx) {
@@ -409,5 +409,5 @@
 		}
 	}
-	
+
 	if (mode_elem == NULL) {
 		fibril_mutex_unlock(&vs->mode_mtx);
@@ -416,9 +416,9 @@
 		return;
 	}
-	
+
 	/* Extract mode description from the list node. */
 	vslmode_t new_mode = mode_elem->mode;
 	fibril_mutex_unlock(&vs->mode_mtx);
-	
+
 	/* Check whether the mode is still up-to-date. */
 	if (new_mode.version != mode_version) {
@@ -427,5 +427,5 @@
 		return;
 	}
-	
+
 	void *new_cell_storage;
 	errno_t rc = async_share_out_finalize(callid, &new_cell_storage);
@@ -434,8 +434,8 @@
 		return;
 	}
-	
+
 	/* Change device internal state. */
 	rc = vs->ops.change_mode(vs, new_mode);
-	
+
 	/* Device driver could not establish new mode. Rollback. */
 	if (rc != EOK) {
@@ -444,5 +444,5 @@
 		return;
 	}
-	
+
 	/*
 	 * Because resources for the new mode were successfully
@@ -456,5 +456,5 @@
 		}
 	}
-	
+
 	/* Insert new mode into the visualizer. */
 	vs->cells.width = new_mode.screen_width;
@@ -463,5 +463,5 @@
 	vs->cur_mode = new_mode;
 	vs->mode_set = true;
-	
+
 	async_answer_0(iid, EOK);
 }
@@ -471,5 +471,5 @@
 	sysarg_t x_offset = (IPC_GET_ARG5(*icall) >> 16);
 	sysarg_t y_offset = (IPC_GET_ARG5(*icall) & 0x0000ffff);
-	
+
 	errno_t rc = vs->ops.handle_damage(vs,
 	    IPC_GET_ARG1(*icall), IPC_GET_ARG2(*icall),
@@ -496,5 +496,5 @@
 	ipc_call_t call;
 	ipc_callid_t callid;
-	
+
 	/* Claim the visualizer. */
 	if (!cas(&vs->ref_cnt, 0, 1)) {
@@ -502,8 +502,8 @@
 		return;
 	}
-	
+
 	/* Accept the connection. */
 	async_answer_0(iid, EOK);
-	
+
 	/* Establish callback session. */
 	callid = async_get_call(&call);
@@ -513,14 +513,14 @@
 	else
 		async_answer_0(callid, ELIMIT);
-	
+
 	/* Enter command loop. */
 	while (true) {
 		callid = async_get_call(&call);
-		
+
 		if (!IPC_GET_IMETHOD(call)) {
 			async_answer_0(callid, EINVAL);
 			break;
 		}
-		
+
 		switch (IPC_GET_IMETHOD(call)) {
 		case VISUALIZER_CLAIM:
@@ -559,5 +559,5 @@
 		}
 	}
-	
+
 terminate:
 	async_hangup(vs->notif_sess);
@@ -570,21 +570,21 @@
 {
 	// TODO
-	
+
 	ipc_call_t call;
 	ipc_callid_t callid;
-	
+
 	/* Accept the connection. */
 	atomic_inc(&rnd->ref_cnt);
 	async_answer_0(iid, EOK);
-	
+
 	/* Enter command loop. */
 	while (true) {
 		callid = async_get_call(&call);
-		
+
 		if (!IPC_GET_IMETHOD(call)) {
 			async_answer_0(callid, EINVAL);
 			break;
 		}
-		
+
 		switch (IPC_GET_IMETHOD(call)) {
 		default:
@@ -593,5 +593,5 @@
 		}
 	}
-	
+
 terminate:
 	atomic_dec(&rnd->ref_cnt);
@@ -603,5 +603,5 @@
 	visualizer_t *vs = graph_get_visualizer(IPC_GET_ARG2(*icall));
 	renderer_t *rnd = graph_get_renderer(IPC_GET_ARG2(*icall));
-	
+
 	if (vs != NULL)
 		graph_visualizer_connection(vs, iid, icall, arg);
