Index: uspace/app/sportdmp/Makefile
===================================================================
--- uspace/app/sportdmp/Makefile	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/app/sportdmp/Makefile	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -28,6 +28,6 @@
 
 USPACE_PREFIX = ../..
-#LIBS = 
-#EXTRA_CFLAGS = 
+LIBS = $(LIBDRV_PREFIX)/libdrv.a
+EXTRA_CFLAGS = -I$(LIBDRV_PREFIX)/include
 BINARY = sportdmp
 
Index: uspace/app/sportdmp/sportdmp.c
===================================================================
--- uspace/app/sportdmp/sportdmp.c	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/app/sportdmp/sportdmp.c	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -27,5 +27,5 @@
  */
 
-#include <device/char_dev.h>
+#include <char_dev_iface.h>
 #include <errno.h>
 #include <ipc/serial_ctl.h>
Index: uspace/app/tester/Makefile
===================================================================
--- uspace/app/tester/Makefile	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/app/tester/Makefile	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -29,6 +29,14 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a
-EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBSOFTFLOAT_PREFIX)
+LIBS = \
+	$(LIBBLOCK_PREFIX)/libblock.a \
+	$(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a \
+	$(LIBDRV_PREFIX)/libdrv.a
+
+EXTRA_CFLAGS = \
+	-I$(LIBBLOCK_PREFIX) \
+	-I$(LIBSOFTFLOAT_PREFIX) \
+	-I$(LIBDRV_PREFIX)/include
+
 BINARY = tester
 
Index: uspace/app/tester/hw/misc/virtchar1.c
===================================================================
--- uspace/app/tester/hw/misc/virtchar1.c	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/app/tester/hw/misc/virtchar1.c	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -40,5 +40,5 @@
 #include <sys/types.h>
 #include <async.h>
-#include <device/char_dev.h>
+#include <char_dev_iface.h>
 #include <str.h>
 #include <vfs/vfs.h>
Index: uspace/app/tester/hw/serial/serial1.c
===================================================================
--- uspace/app/tester/hw/serial/serial1.c	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/app/tester/hw/serial/serial1.c	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -43,5 +43,5 @@
 #include <ipc/services.h>
 #include <loc.h>
-#include <device/char_dev.h>
+#include <char_dev_iface.h>
 #include <str.h>
 #include <ipc/serial_ctl.h>
Index: uspace/lib/c/Makefile
===================================================================
--- uspace/lib/c/Makefile	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/lib/c/Makefile	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -69,5 +69,4 @@
 	generic/device/hw_res_parsed.c \
 	generic/device/pio_window.c \
-	generic/device/char_dev.c \
 	generic/device/clock_dev.c \
 	generic/dhcp.c \
Index: uspace/lib/c/generic/device/char_dev.c
===================================================================
--- uspace/lib/c/generic/device/char_dev.c	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ 	(revision )
@@ -1,127 +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_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 sess Session 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(async_sess_t *sess, void *buf, size_t size, bool read)
-{
-	ipc_call_t answer;
-	aid_t req;
-	int ret;
-	
-	async_exch_t *exch = async_exchange_begin(sess);
-	
-	if (read) {
-		req = async_send_1(exch, DEV_IFACE_ID(CHAR_DEV_IFACE),
-		    CHAR_DEV_READ, &answer);
-		ret = async_data_read_start(exch, buf, size);
-	} else {
-		req = async_send_1(exch, DEV_IFACE_ID(CHAR_DEV_IFACE),
-		    CHAR_DEV_WRITE, &answer);
-		ret = async_data_write_start(exch, buf, size);
-	}
-	
-	async_exchange_end(exch);
-	
-	sysarg_t rc;
-	if (ret != EOK) {
-		async_wait_for(req, &rc);
-		if (rc == EOK)
-			return (ssize_t) ret;
-		
-		return (ssize_t) rc;
-	}
-	
-	async_wait_for(req, &rc);
-	
-	ret = (int) rc;
-	if (ret != EOK)
-		return (ssize_t) ret;
-	
-	return (ssize_t) IPC_GET_ARG1(answer);
-}
-
-/** Read from character device.
- *
- * @param sess Session 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(async_sess_t *sess, void *buf, size_t size)
-{
-	return char_dev_rw(sess, buf, size, true);
-}
-
-/** Write to character device.
- *
- * @param sess Session 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(async_sess_t *sess, void *buf, size_t size)
-{
-	return char_dev_rw(sess, buf, size, false);
-}
-
-/** @}
- */
Index: uspace/lib/c/include/device/char_dev.h
===================================================================
--- uspace/lib/c/include/device/char_dev.h	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ 	(revision )
@@ -1,51 +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_CHAR_DEV_H_
-#define LIBC_DEVICE_CHAR_DEV_H_
-
-#include <async.h>
-
-typedef enum {
-	CHAR_DEV_READ = 0,
-	CHAR_DEV_WRITE
-} char_dev_method_t;
-
-extern ssize_t char_dev_read(async_sess_t *, void *, size_t);
-extern ssize_t char_dev_write(async_sess_t *, void *, size_t);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/drv/generic/remote_char_dev.c
===================================================================
--- uspace/lib/drv/generic/remote_char_dev.c	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/lib/drv/generic/remote_char_dev.c	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -36,10 +36,94 @@
 #include <errno.h>
 #include <macros.h>
-#include <device/char_dev.h>
 
 #include "ops/char_dev.h"
+#include "char_dev_iface.h"
 #include "ddf/driver.h"
 
 #define MAX_CHAR_RW_COUNT 256
+
+/** Read to or write from device.
+ *
+ * Helper function to read to or write from a device
+ * using its character interface.
+ *
+ * @param sess Session 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(async_sess_t *sess, void *buf, size_t size, bool read)
+{
+	ipc_call_t answer;
+	aid_t req;
+	int ret;
+	
+	async_exch_t *exch = async_exchange_begin(sess);
+	
+	if (read) {
+		req = async_send_1(exch, DEV_IFACE_ID(CHAR_DEV_IFACE),
+		    CHAR_DEV_READ, &answer);
+		ret = async_data_read_start(exch, buf, size);
+	} else {
+		req = async_send_1(exch, DEV_IFACE_ID(CHAR_DEV_IFACE),
+		    CHAR_DEV_WRITE, &answer);
+		ret = async_data_write_start(exch, buf, size);
+	}
+	
+	async_exchange_end(exch);
+	
+	sysarg_t rc;
+	if (ret != EOK) {
+		async_wait_for(req, &rc);
+		if (rc == EOK)
+			return (ssize_t) ret;
+		
+		return (ssize_t) rc;
+	}
+	
+	async_wait_for(req, &rc);
+	
+	ret = (int) rc;
+	if (ret != EOK)
+		return (ssize_t) ret;
+	
+	return (ssize_t) IPC_GET_ARG1(answer);
+}
+
+/** Read from character device.
+ *
+ * @param sess Session 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(async_sess_t *sess, void *buf, size_t size)
+{
+	return char_dev_rw(sess, buf, size, true);
+}
+
+/** Write to character device.
+ *
+ * @param sess Session 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(async_sess_t *sess, void *buf, size_t size)
+{
+	return char_dev_rw(sess, buf, size, false);
+}
 
 static void remote_char_read(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
Index: uspace/lib/drv/include/char_dev_iface.h
===================================================================
--- uspace/lib/drv/include/char_dev_iface.h	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
+++ uspace/lib/drv/include/char_dev_iface.h	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -0,0 +1,51 @@
+/*
+ * 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 LIBDRV_CHAR_DEV_IFACE_H_
+#define LIBDRV_CHAR_DEV_IFACE_H_
+
+#include <async.h>
+
+typedef enum {
+	CHAR_DEV_READ = 0,
+	CHAR_DEV_WRITE
+} char_dev_method_t;
+
+extern ssize_t char_dev_read(async_sess_t *, void *, size_t);
+extern ssize_t char_dev_write(async_sess_t *, void *, size_t);
+
+#endif
+
+/** @}
+ */
Index: uspace/srv/hid/isdv4_tablet/Makefile
===================================================================
--- uspace/srv/hid/isdv4_tablet/Makefile	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/srv/hid/isdv4_tablet/Makefile	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -28,6 +28,6 @@
 
 USPACE_PREFIX = ../../..
-#LIBS = 
-#EXTRA_CFLAGS = 
+LIBS = $(LIBDRV_PREFIX)/libdrv.a
+EXTRA_CFLAGS = -I$(LIBDRV_PREFIX)/include
 BINARY = isdv4_tablet
 
Index: uspace/srv/hid/isdv4_tablet/isdv4.c
===================================================================
--- uspace/srv/hid/isdv4_tablet/isdv4.c	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/srv/hid/isdv4_tablet/isdv4.c	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -27,5 +27,5 @@
  */
 
-#include <device/char_dev.h>
+#include <char_dev_iface.h>
 #include <errno.h>
 #include <stdlib.h>
Index: uspace/srv/hid/isdv4_tablet/main.c
===================================================================
--- uspace/srv/hid/isdv4_tablet/main.c	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/srv/hid/isdv4_tablet/main.c	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -27,5 +27,5 @@
  */
 
-#include <device/char_dev.h>
+#include <char_dev_iface.h>
 #include <errno.h>
 #include <ipc/serial_ctl.h>
Index: uspace/srv/net/slip/Makefile
===================================================================
--- uspace/srv/net/slip/Makefile	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/srv/net/slip/Makefile	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -29,5 +29,6 @@
 USPACE_PREFIX = ../../..
 BINARY = slip
-
+LIBS = $(LIBDRV_PREFIX)/libdrv.a
+EXTRA_CFLAGS = -I$(LIBDRV_PREFIX)/include
 SOURCES = \
 	slip.c
Index: uspace/srv/net/slip/slip.c
===================================================================
--- uspace/srv/net/slip/slip.c	(revision 67472b9b2fe45eb27d0fdbb80b57702416e56ce2)
+++ uspace/srv/net/slip/slip.c	(revision 5c65e613de52e725ff215514fe39a8d1428767d2)
@@ -40,5 +40,5 @@
 #include <inet/addr.h>
 #include <inet/iplink_srv.h>
-#include <device/char_dev.h>
+#include <char_dev_iface.h>
 #include <io/log.h>
 #include <errno.h>
