Index: uspace/lib/graph/graph.c
===================================================================
--- uspace/lib/graph/graph.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ 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);
Index: uspace/lib/graph/graph.h
===================================================================
--- uspace/lib/graph/graph.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ uspace/lib/graph/graph.h	(revision f1380b76772fb5d1aa03637b5e57bd9b929fea61)
@@ -55,5 +55,5 @@
 	 * specific for a claimed visualizer. */
 	errno_t (*claim)(struct visualizer *vs);
-	
+
 	/**
 	 * Device driver shall deallocate any necessary internal structures
@@ -62,5 +62,5 @@
 	 * accordingly (e.g. deallocate frame buffers). */
 	errno_t (*yield)(struct visualizer *vs);
-	
+
 	/**
 	 * Device driver shall first try to claim all resources required for
@@ -73,5 +73,5 @@
 	 * changed at this point. */
 	errno_t (*change_mode)(struct visualizer *vs, vslmode_t new_mode);
-	
+
 	/**
 	 * Device driver shall render the cells from damaged region into its
@@ -85,5 +85,5 @@
 	    sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height,
 	    sysarg_t x_offset, sysarg_t y_offset);
-	
+
 	/**
 	 * Upper layers of the graphic stack might report inactivity. In such
@@ -91,5 +91,5 @@
 	 * corresponding to the visualizer. */
 	errno_t (*suspend)(struct visualizer *vs);
-	
+
 	/**
 	 * When upper layers detect activity on suspended visualizer, device
@@ -107,5 +107,5 @@
 	 * Field is fully managed by libgraph. */
 	link_t link;
-	
+
 	/**
 	 * When reference count equals 1, visualizer is claimed by a client,
@@ -114,5 +114,5 @@
 	 * Field is fully managed by libgraph. */
 	atomic_t ref_cnt;
-	
+
 	/**
 	 * Visualizer ID assigned by some particular registration service
@@ -123,5 +123,5 @@
 	 * responsibility to set and update this field. */
 	sysarg_t reg_svc_handle;
-	
+
 	/**
 	 * Visualizer ID in the client context. When client gets notified by
@@ -132,5 +132,5 @@
 	 * gets claimed and is valid until it is yielded. */
 	sysarg_t client_side_handle;
-	
+
 	/**
 	 * Callback session to the client. Established by libgraph during initial
@@ -143,5 +143,5 @@
 	 * through notification functions. */
 	async_sess_t *notif_sess;
-	
+
 	/**
 	 * Mutex protecting the mode list and default mode index. This is required
@@ -152,5 +152,5 @@
 	 * modes list or default mode index. */
 	fibril_mutex_t mode_mtx;
-	
+
 	/**
 	 * List of all modes that can be set by this visualizer. List is populated
@@ -164,5 +164,5 @@
 	 * mutex. */
 	list_t modes;
-	
+
 	/**
 	 * Index of the default mode. Might come in handy to the clients that are
@@ -175,5 +175,5 @@
 	 * mutex. */
 	sysarg_t def_mode_idx;
-	
+
 	/**
 	 * Copy of the currently established mode. It is read by both libgraph and
@@ -183,5 +183,5 @@
 	 * Field is fully managed by libgraph, can be read by device driver. */
 	vslmode_t cur_mode;
-	
+
 	/**
 	 * Determines whether the visualizer is currently set to some mode or not,
@@ -189,5 +189,5 @@
 	 * Field is fully managed by libgraph, can be read by device driver. */
 	bool mode_set;
-	
+
 	/**
 	 * Device driver function pointers.
@@ -195,5 +195,5 @@
 	 * functions through it. */
 	visualizer_ops_t ops;
-	
+
 	/**
 	 * Backbuffer shared with the client. Sharing is established by libgraph.
@@ -202,5 +202,5 @@
 	 * Field is fully managed by libgraph, can be read by device driver. */
 	pixelmap_t cells;
-	
+
 	/**
 	 * Device driver context, completely opaque to the libgraph. Intended to
@@ -252,9 +252,9 @@
 	// TODO
 	link_t link;
-	
+
 	atomic_t ref_cnt;
-	
+
 	sysarg_t reg_svc_handle;
-	
+
 	renderer_ops_t ops;
 } renderer_t;
