Index: uspace/lib/c/generic/devman.c
===================================================================
--- uspace/lib/c/generic/devman.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
+++ uspace/lib/c/generic/devman.c	(revision 34e1206ec4dc79f0592077e3ee270fba91d1eb9d)
@@ -62,8 +62,8 @@
 {
 	fibril_mutex_lock(mtx);
-	
+
 	if ((*dst == NULL) && (src != NULL))
 		*dst = src;
-	
+
 	fibril_mutex_unlock(mtx);
 }
@@ -81,9 +81,9 @@
 	case INTERFACE_DDF_DRIVER:
 		fibril_mutex_lock(&devman_driver_block_mutex);
-		
+
 		while (devman_driver_block_sess == NULL) {
 			clone_session(&devman_driver_mutex, devman_driver_sess,
 			    &devman_driver_block_sess);
-			
+
 			if (devman_driver_block_sess == NULL)
 				devman_driver_block_sess =
@@ -91,18 +91,18 @@
 				    INTERFACE_DDF_DRIVER, 0);
 		}
-		
+
 		fibril_mutex_unlock(&devman_driver_block_mutex);
-		
+
 		clone_session(&devman_driver_mutex, devman_driver_block_sess,
 		    &devman_driver_sess);
-		
+
 		return async_exchange_begin(devman_driver_block_sess);
 	case INTERFACE_DDF_CLIENT:
 		fibril_mutex_lock(&devman_client_block_mutex);
-		
+
 		while (devman_client_block_sess == NULL) {
 			clone_session(&devman_client_mutex, devman_client_sess,
 			    &devman_client_block_sess);
-			
+
 			if (devman_client_block_sess == NULL)
 				devman_client_block_sess =
@@ -110,10 +110,10 @@
 				    INTERFACE_DDF_CLIENT, 0);
 		}
-		
+
 		fibril_mutex_unlock(&devman_client_block_mutex);
-		
+
 		clone_session(&devman_client_mutex, devman_client_block_sess,
 		    &devman_client_sess);
-		
+
 		return async_exchange_begin(devman_client_block_sess);
 	default:
@@ -134,29 +134,29 @@
 	case INTERFACE_DDF_DRIVER:
 		fibril_mutex_lock(&devman_driver_mutex);
-		
+
 		if (devman_driver_sess == NULL)
 			devman_driver_sess =
 			    service_connect(SERVICE_DEVMAN,
 			    INTERFACE_DDF_DRIVER, 0);
-		
+
 		fibril_mutex_unlock(&devman_driver_mutex);
-		
+
 		if (devman_driver_sess == NULL)
 			return NULL;
-		
+
 		return async_exchange_begin(devman_driver_sess);
 	case INTERFACE_DDF_CLIENT:
 		fibril_mutex_lock(&devman_client_mutex);
-		
+
 		if (devman_client_sess == NULL)
 			devman_client_sess =
 			    service_connect(SERVICE_DEVMAN,
 			    INTERFACE_DDF_CLIENT, 0);
-		
+
 		fibril_mutex_unlock(&devman_client_mutex);
-		
+
 		if (devman_client_sess == NULL)
 			return NULL;
-		
+
 		return async_exchange_begin(devman_client_sess);
 	default:
@@ -179,20 +179,20 @@
 {
 	async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
-	
+
 	ipc_call_t answer;
 	aid_t req = async_send_2(exch, DEVMAN_DRIVER_REGISTER, 0, 0, &answer);
 	errno_t retval = async_data_write_start(exch, name, str_size(name));
-	
-	devman_exchange_end(exch);
-	
+
+	devman_exchange_end(exch);
+
 	if (retval != EOK) {
 		async_forget(req);
 		return retval;
 	}
-	
+
 	exch = devman_exchange_begin(INTERFACE_DDF_DRIVER);
 	async_connect_to_me(exch, 0, 0, 0);
 	devman_exchange_end(exch);
-	
+
 	async_wait_for(req, &retval);
 	return retval;
@@ -218,5 +218,5 @@
 	unsigned long match_count = list_count(&match_ids->ids);
 	async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
-	
+
 	ipc_call_t answer;
 	aid_t req = async_send_3(exch, DEVMAN_ADD_FUNCTION, (sysarg_t) ftype,
@@ -228,5 +228,5 @@
 		return retval;
 	}
-	
+
 	list_foreach(match_ids->ids, link, match_id_t, match_id) {
 		ipc_call_t answer2;
@@ -241,5 +241,5 @@
 			return retval;
 		}
-		
+
 		async_wait_for(req2, &retval);
 		if (retval != EOK) {
@@ -249,7 +249,7 @@
 		}
 	}
-	
-	devman_exchange_end(exch);
-	
+
+	devman_exchange_end(exch);
+
 	async_wait_for(req, &retval);
 	if (retval == EOK) {
@@ -260,5 +260,5 @@
 			*funh = -1;
 	}
-	
+
 	return retval;
 }
@@ -268,5 +268,5 @@
 {
 	async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
-	
+
 	ipc_call_t answer;
 	aid_t req = async_send_1(exch, DEVMAN_ADD_DEVICE_TO_CATEGORY,
@@ -274,12 +274,12 @@
 	errno_t retval = async_data_write_start(exch, cat_name,
 	    str_size(cat_name));
-	
-	devman_exchange_end(exch);
-	
+
+	devman_exchange_end(exch);
+
 	if (retval != EOK) {
 		async_forget(req);
 		return retval;
 	}
-	
+
 	async_wait_for(req, &retval);
 	return retval;
@@ -289,5 +289,5 @@
 {
 	async_sess_t *sess;
-	
+
 	if (flags & IPC_FLAG_BLOCKING)
 		sess = service_connect_blocking(SERVICE_DEVMAN,
@@ -296,5 +296,5 @@
 		sess = service_connect(SERVICE_DEVMAN,
 		    INTERFACE_DEVMAN_DEVICE, handle);
-	
+
 	return sess;
 }
@@ -311,9 +311,9 @@
 	async_exch_t *exch;
 	errno_t retval;
-	
+
 	exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
 	retval = async_req_1_0(exch, DEVMAN_REMOVE_FUNCTION, (sysarg_t) funh);
 	devman_exchange_end(exch);
-	
+
 	return retval;
 }
@@ -324,7 +324,7 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	errno_t retval = async_req_1_0(exch, DEVMAN_DRV_FUN_ONLINE, funh);
-	
+
 	devman_exchange_end(exch);
 	return retval;
@@ -336,7 +336,7 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	errno_t retval = async_req_1_0(exch, DEVMAN_DRV_FUN_OFFLINE, funh);
-	
+
 	devman_exchange_end(exch);
 	return retval;
@@ -347,5 +347,5 @@
 {
 	async_sess_t *sess;
-	
+
 	if (flags & IPC_FLAG_BLOCKING)
 		sess = service_connect_blocking(SERVICE_DEVMAN,
@@ -354,5 +354,5 @@
 		sess = service_connect_blocking(SERVICE_DEVMAN,
 		    INTERFACE_DEVMAN_PARENT, handle);
-	
+
 	return sess;
 }
@@ -362,5 +362,5 @@
 {
 	async_exch_t *exch;
-	
+
 	if (flags & IPC_FLAG_BLOCKING)
 		exch = devman_exchange_begin_blocking(INTERFACE_DDF_CLIENT);
@@ -370,5 +370,5 @@
 			return ENOMEM;
 	}
-	
+
 	ipc_call_t answer;
 	aid_t req = async_send_2(exch, DEVMAN_DEVICE_GET_HANDLE, flags, 0,
@@ -376,24 +376,24 @@
 	errno_t retval = async_data_write_start(exch, pathname,
 	    str_size(pathname));
-	
-	devman_exchange_end(exch);
-	
+
+	devman_exchange_end(exch);
+
 	if (retval != EOK) {
 		async_forget(req);
 		return retval;
 	}
-	
+
 	async_wait_for(req, &retval);
-	
+
 	if (retval != EOK) {
 		if (handle != NULL)
 			*handle = (devman_handle_t) -1;
-		
-		return retval;
-	}
-	
+
+		return retval;
+	}
+
 	if (handle != NULL)
 		*handle = (devman_handle_t) IPC_GET_ARG1(answer);
-	
+
 	return retval;
 }
@@ -406,26 +406,26 @@
 	size_t act_size;
 	errno_t dretval;
-	
+
 	exch = devman_exchange_begin_blocking(INTERFACE_DDF_CLIENT);
-	
+
 	ipc_call_t answer;
 	aid_t req = async_send_2(exch, method, arg1, arg2, &answer);
 	aid_t dreq = async_data_read(exch, buf, buf_size - 1, &dreply);
 	async_wait_for(dreq, &dretval);
-	
-	devman_exchange_end(exch);
-	
+
+	devman_exchange_end(exch);
+
 	if (dretval != EOK) {
 		async_forget(req);
 		return dretval;
 	}
-	
+
 	errno_t retval;
 	async_wait_for(req, &retval);
-	
-	if (retval != EOK) {
-		return retval;
-	}
-	
+
+	if (retval != EOK) {
+		return retval;
+	}
+
 	if (r1 != NULL)
 		*r1 = IPC_GET_ARG1(answer);
@@ -433,5 +433,5 @@
 	assert(act_size <= buf_size - 1);
 	buf[act_size] = '\0';
-	
+
 	return EOK;
 }
@@ -475,7 +475,7 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	errno_t retval = async_req_1_0(exch, DEVMAN_FUN_ONLINE, funh);
-	
+
 	devman_exchange_end(exch);
 	return retval;
@@ -487,7 +487,7 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	errno_t retval = async_req_1_0(exch, DEVMAN_FUN_OFFLINE, funh);
-	
+
 	devman_exchange_end(exch);
 	return retval;
@@ -502,19 +502,19 @@
 	aid_t req = async_send_1(exch, method, arg1, &answer);
 	errno_t rc = async_data_read_start(exch, handle_buf, buf_size);
-	
-	devman_exchange_end(exch);
-	
+
+	devman_exchange_end(exch);
+
 	if (rc != EOK) {
 		async_forget(req);
 		return rc;
 	}
-	
+
 	errno_t retval;
 	async_wait_for(req, &retval);
-	
-	if (retval != EOK) {
-		return retval;
-	}
-	
+
+	if (retval != EOK) {
+		return retval;
+	}
+
 	*act_size = IPC_GET_ARG1(answer);
 	return EOK;
@@ -579,8 +579,8 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	errno_t retval = async_req_1_1(exch, DEVMAN_FUN_GET_CHILD,
 	    funh, devh);
-	
+
 	devman_exchange_end(exch);
 	return retval;
@@ -599,8 +599,8 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	errno_t retval = async_req_1_1(exch, DEVMAN_DEV_GET_PARENT,
 	    devh, funh);
-	
+
 	devman_exchange_end(exch);
 	return retval;
@@ -612,8 +612,8 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	errno_t retval = async_req_1_1(exch, DEVMAN_FUN_SID_TO_HANDLE,
 	    sid, handle);
-	
+
 	devman_exchange_end(exch);
 	return retval;
@@ -640,29 +640,29 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	ipc_call_t answer;
 	aid_t req = async_send_0(exch, DEVMAN_DRIVER_GET_HANDLE, &answer);
 	errno_t retval = async_data_write_start(exch, drvname,
 	    str_size(drvname));
-	
-	devman_exchange_end(exch);
-	
+
+	devman_exchange_end(exch);
+
 	if (retval != EOK) {
 		async_forget(req);
 		return retval;
 	}
-	
+
 	async_wait_for(req, &retval);
-	
+
 	if (retval != EOK) {
 		if (handle != NULL)
 			*handle = (devman_handle_t) -1;
-		
-		return retval;
-	}
-	
+
+		return retval;
+	}
+
 	if (handle != NULL)
 		*handle = (devman_handle_t) IPC_GET_ARG1(answer);
-	
+
 	return retval;
 }
@@ -695,8 +695,8 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	errno_t rc = async_req_1_1(exch, DEVMAN_DRIVER_GET_STATE, drvh,
 	    &state);
-	
+
 	devman_exchange_end(exch);
 	if (rc != EOK)
@@ -712,7 +712,7 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	errno_t rc = async_req_1_0(exch, DEVMAN_DRIVER_LOAD, drvh);
-	
+
 	devman_exchange_end(exch);
 	return rc;
@@ -724,7 +724,7 @@
 	if (exch == NULL)
 		return ENOMEM;
-	
+
 	errno_t rc = async_req_1_0(exch, DEVMAN_DRIVER_UNLOAD, drvh);
-	
+
 	devman_exchange_end(exch);
 	return rc;
