Index: uspace/app/tester/hw/misc/virtchar1.c
===================================================================
--- uspace/app/tester/hw/misc/virtchar1.c	(revision f724e82e9467af62ee9b9a530103c1be3d50e4ef)
+++ uspace/app/tester/hw/misc/virtchar1.c	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
@@ -40,10 +40,9 @@
 #include <sys/types.h>
 #include <async.h>
-#include <device/char.h>
+#include <device/char_dev.h>
 #include <str.h>
 #include <vfs/vfs.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <device/char.h>
 #include "../../tester.h"
 
Index: uspace/app/tester/hw/serial/serial1.c
===================================================================
--- uspace/app/tester/hw/serial/serial1.c	(revision f724e82e9467af62ee9b9a530103c1be3d50e4ef)
+++ uspace/app/tester/hw/serial/serial1.c	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
@@ -45,5 +45,5 @@
 #include <ipc/devman.h>
 #include <devman.h>
-#include <device/char.h>
+#include <device/char_dev.h>
 #include <str.h>
 #include <ipc/serial_ctl.h>
Index: uspace/lib/c/Makefile
===================================================================
--- uspace/lib/c/Makefile	(revision f724e82e9467af62ee9b9a530103c1be3d50e4ef)
+++ uspace/lib/c/Makefile	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
@@ -59,5 +59,5 @@
 	generic/devman.c \
 	generic/device/hw_res.c \
-	generic/device/char.c \
+	generic/device/char_dev.c \
 	generic/event.c \
 	generic/errno.c \
Index: uspace/lib/c/generic/device/char.c
===================================================================
--- uspace/lib/c/generic/device/char.c	(revision f724e82e9467af62ee9b9a530103c1be3d50e4ef)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/*
- * Copyright (c) 2010 Lenka Trochtova
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- /** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <ipc/dev_iface.h>
-#include <device/char.h>
-#include <errno.h>
-#include <async.h>
-#include <malloc.h>
-#include <stdio.h>
-
-/** Read to or write from device.
- *
- * Helper function to read to or write from a device
- * using its character interface.
- *
- * @param dev_phone	Phone to the device.
- * @param buf		Buffer for the data read from or written to the device.
- * @param size		Maximum size of data (in bytes) to be read or written.
- * @param read		Read from the device if true, write to it otherwise.
- *
- * @return		Non-negative number of bytes actually read from or
- *			written to the device on success, negative error number
- *			otherwise.
- */
-static ssize_t char_dev_rw(int dev_phone, void *buf, size_t size, bool read)
-{
-	async_serialize_start();
-	
-	ipc_call_t answer;
-	aid_t req;
-	int ret;
-	
-	if (read) {
-		req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE),
-		    CHAR_DEV_READ, &answer);
-		ret = async_data_read_start(dev_phone, buf, size);
-	} else {
-		req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE),
-		    CHAR_DEV_WRITE, &answer);
-		ret = async_data_write_start(dev_phone, buf, size);
-	}
-	
-	sysarg_t rc;
-	if (ret != EOK) {
-		async_wait_for(req, &rc);
-		async_serialize_end();
-		if (rc == EOK)
-			return (ssize_t) ret;
-		
-		return (ssize_t) rc;
-	}
-	
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	
-	ret = (int) rc;
-	if (ret != EOK)
-		return (ssize_t) ret;
-	
-	return (ssize_t) IPC_GET_ARG1(answer);
-}
-
-/** Read from character device.
- *
- * @param dev_phone	Phone to the device.
- * @param buf		Output buffer for the data read from the device.
- * @param size		Maximum size (in bytes) of the data to be read.
- *
- * @return		Non-negative number of bytes actually read from the
- *			device on success, negative error number otherwise.
- */
-ssize_t char_dev_read(int dev_phone, void *buf, size_t size)
-{
-	return char_dev_rw(dev_phone, buf, size, true);
-}
-
-/** Write to character device.
- *
- * @param dev_phone	Phone to the device.
- * @param buf		Input buffer containg the data to be written to the
- *			device.
- * @param size		Maximum size (in bytes) of the data to be written.
- *
- * @return		Non-negative number of bytes actually written to the
- *			device on success, negative error number otherwise.
- */
-ssize_t char_dev_write(int dev_phone, void *buf, size_t size)
-{
-	return char_dev_rw(dev_phone, buf, size, false);
-}
-
-/** @}
- */
Index: uspace/lib/c/generic/device/char_dev.c
===================================================================
--- uspace/lib/c/generic/device/char_dev.c	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
+++ uspace/lib/c/generic/device/char_dev.c	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ /** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <ipc/dev_iface.h>
+#include <device/char_dev.h>
+#include <errno.h>
+#include <async.h>
+#include <malloc.h>
+#include <stdio.h>
+
+/** Read to or write from device.
+ *
+ * Helper function to read to or write from a device
+ * using its character interface.
+ *
+ * @param dev_phone	Phone to the device.
+ * @param buf		Buffer for the data read from or written to the device.
+ * @param size		Maximum size of data (in bytes) to be read or written.
+ * @param read		Read from the device if true, write to it otherwise.
+ *
+ * @return		Non-negative number of bytes actually read from or
+ *			written to the device on success, negative error number
+ *			otherwise.
+ */
+static ssize_t char_dev_rw(int dev_phone, void *buf, size_t size, bool read)
+{
+	async_serialize_start();
+	
+	ipc_call_t answer;
+	aid_t req;
+	int ret;
+	
+	if (read) {
+		req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE),
+		    CHAR_DEV_READ, &answer);
+		ret = async_data_read_start(dev_phone, buf, size);
+	} else {
+		req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE),
+		    CHAR_DEV_WRITE, &answer);
+		ret = async_data_write_start(dev_phone, buf, size);
+	}
+	
+	sysarg_t rc;
+	if (ret != EOK) {
+		async_wait_for(req, &rc);
+		async_serialize_end();
+		if (rc == EOK)
+			return (ssize_t) ret;
+		
+		return (ssize_t) rc;
+	}
+	
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	
+	ret = (int) rc;
+	if (ret != EOK)
+		return (ssize_t) ret;
+	
+	return (ssize_t) IPC_GET_ARG1(answer);
+}
+
+/** Read from character device.
+ *
+ * @param dev_phone	Phone to the device.
+ * @param buf		Output buffer for the data read from the device.
+ * @param size		Maximum size (in bytes) of the data to be read.
+ *
+ * @return		Non-negative number of bytes actually read from the
+ *			device on success, negative error number otherwise.
+ */
+ssize_t char_dev_read(int dev_phone, void *buf, size_t size)
+{
+	return char_dev_rw(dev_phone, buf, size, true);
+}
+
+/** Write to character device.
+ *
+ * @param dev_phone	Phone to the device.
+ * @param buf		Input buffer containg the data to be written to the
+ *			device.
+ * @param size		Maximum size (in bytes) of the data to be written.
+ *
+ * @return		Non-negative number of bytes actually written to the
+ *			device on success, negative error number otherwise.
+ */
+ssize_t char_dev_write(int dev_phone, void *buf, size_t size)
+{
+	return char_dev_rw(dev_phone, buf, size, false);
+}
+
+/** @}
+ */
Index: uspace/lib/c/include/device/char.h
===================================================================
--- uspace/lib/c/include/device/char.h	(revision f724e82e9467af62ee9b9a530103c1be3d50e4ef)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
- * Copyright (c) 2010 Lenka Trochtova
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_DEVICE_HW_RES_H_
-#define LIBC_DEVICE_HW_RES_H_
-
-typedef enum {
-	CHAR_DEV_READ = 0,
-	CHAR_DEV_WRITE
-} hw_res_funcs_t;
-
-ssize_t char_dev_read(int dev_phone, void *buf, size_t len);
-ssize_t char_dev_write(int dev_phone, void *buf, size_t len);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/include/device/char_dev.h
===================================================================
--- uspace/lib/c/include/device/char_dev.h	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
+++ uspace/lib/c/include/device/char_dev.h	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_DEVICE_CHAR_DEV_H_
+#define LIBC_DEVICE_CHAR_DEV_H_
+
+typedef enum {
+	CHAR_DEV_READ = 0,
+	CHAR_DEV_WRITE
+} char_dev_method_t;
+
+ssize_t char_dev_read(int dev_phone, void *buf, size_t len);
+ssize_t char_dev_write(int dev_phone, void *buf, size_t len);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/device/hw_res.h
===================================================================
--- uspace/lib/c/include/device/hw_res.h	(revision f724e82e9467af62ee9b9a530103c1be3d50e4ef)
+++ uspace/lib/c/include/device/hw_res.h	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
@@ -43,5 +43,5 @@
 	HW_RES_GET_RESOURCE_LIST = 0,
 	HW_RES_ENABLE_INTERRUPT
-} hw_res_funcs_t;
+} hw_res_method_t;
 
 /** HW resource types */
Index: uspace/lib/drv/generic/remote_char.c
===================================================================
--- uspace/lib/drv/generic/remote_char.c	(revision f724e82e9467af62ee9b9a530103c1be3d50e4ef)
+++ uspace/lib/drv/generic/remote_char.c	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
@@ -46,5 +46,5 @@
 
 /** Remote character interface operations. */
-static remote_iface_func_ptr_t remote_char_iface_ops [] = {
+static remote_iface_func_ptr_t remote_char_iface_ops[] = {
 	&remote_char_read,
 	&remote_char_write
@@ -74,5 +74,5 @@
 remote_char_read(device_t *dev, void *iface, ipc_callid_t callid,
     ipc_call_t *call)
-{	
+{
 	char_iface_t *char_iface = (char_iface_t *) iface;
 	ipc_callid_t cid;
@@ -136,5 +136,5 @@
 		ipc_answer_0(callid, ENOTSUP);
 		return;
-	}	
+	}
 	
 	if (len > MAX_CHAR_RW_COUNT)
Index: uspace/lib/drv/include/driver.h
===================================================================
--- uspace/lib/drv/include/driver.h	(revision f724e82e9467af62ee9b9a530103c1be3d50e4ef)
+++ uspace/lib/drv/include/driver.h	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
@@ -41,6 +41,4 @@
 #include <ipc/devman.h>
 #include <ipc/dev_iface.h>
-#include <device/hw_res.h>
-#include <device/char.h>
 #include <assert.h>
 #include <ddi.h>
Index: uspace/lib/drv/include/resource.h
===================================================================
--- uspace/lib/drv/include/resource.h	(revision f724e82e9467af62ee9b9a530103c1be3d50e4ef)
+++ uspace/lib/drv/include/resource.h	(revision ce79069b92de331e039d57e0c8a3d64e644321a5)
@@ -36,5 +36,6 @@
 #define LIBDRV_RESOURCE_H_
 
-#include "driver.h"
+#include <device/hw_res.h>
+#include <sys/types.h>
 
 typedef struct resource_iface {
