Index: uspace/lib/drv/generic/driver.c
===================================================================
--- uspace/lib/drv/generic/driver.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/lib/drv/generic/driver.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -1,4 +1,5 @@
 /*
  * Copyright (c) 2010 Lenka Trochtova
+ * Copyright (c) 2011 Jiri Svoboda
  * All rights reserved.
  *
@@ -76,6 +77,6 @@
 };
 
-static device_t *create_device(void);
-static void delete_device(device_t *);
+static ddf_dev_t *create_device(void);
+static void delete_device(ddf_dev_t *);
 
 static void driver_irq_handler(ipc_callid_t iid, ipc_call_t *icall)
@@ -152,5 +153,5 @@
 
 interrupt_context_t *
-find_interrupt_context(interrupt_context_list_t *list, device_t *dev, int irq)
+find_interrupt_context(interrupt_context_list_t *list, ddf_dev_t *dev, int irq)
 {
 	fibril_mutex_lock(&list->mutex);
@@ -174,5 +175,5 @@
 
 int
-register_interrupt_handler(device_t *dev, int irq, interrupt_handler_t *handler,
+register_interrupt_handler(ddf_dev_t *dev, int irq, interrupt_handler_t *handler,
     irq_code_t *pseudocode)
 {
@@ -197,5 +198,5 @@
 }
 
-int unregister_interrupt_handler(device_t *dev, int irq)
+int unregister_interrupt_handler(ddf_dev_t *dev, int irq)
 {
 	interrupt_context_t *ctx = find_interrupt_context(&interrupt_contexts,
@@ -211,5 +212,5 @@
 }
 
-static void add_to_functions_list(function_t *fun)
+static void add_to_functions_list(ddf_fun_t *fun)
 {
 	fibril_mutex_lock(&functions_mutex);
@@ -218,5 +219,5 @@
 }
 
-static void remove_from_functions_list(function_t *fun)
+static void remove_from_functions_list(ddf_fun_t *fun)
 {
 	fibril_mutex_lock(&functions_mutex);
@@ -225,7 +226,7 @@
 }
 
-static function_t *driver_get_function(link_t *functions, devman_handle_t handle)
-{
-	function_t *fun = NULL;
+static ddf_fun_t *driver_get_function(link_t *functions, devman_handle_t handle)
+{
+	ddf_fun_t *fun = NULL;
 	printf("driver_get_function handle=%" PRIun "\n", handle);
 	
@@ -234,5 +235,5 @@
 	
 	while (link != functions) {
-		fun = list_get_instance(link, function_t, link);
+		fun = list_get_instance(link, ddf_fun_t, link);
 		printf(" - fun handle %" PRIun "\n", fun->handle);
 		if (fun->handle == handle) {
@@ -257,5 +258,5 @@
     	devman_handle_t parent_fun_handle = IPC_GET_ARG2(*icall);
 	
-	device_t *dev = create_device();
+	ddf_dev_t *dev = create_device();
 	dev->handle = dev_handle;
 
@@ -318,5 +319,5 @@
 	 */
 	devman_handle_t handle = IPC_GET_ARG2(*icall);
-	function_t *fun = driver_get_function(&functions, handle);
+	ddf_fun_t *fun = driver_get_function(&functions, handle);
 
 	if (fun == NULL) {
@@ -461,13 +462,13 @@
  * @return		The device structure.
  */
-static device_t *create_device(void)
-{
-	device_t *dev;
-
-	dev = malloc(sizeof(device_t));
+static ddf_dev_t *create_device(void)
+{
+	ddf_dev_t *dev;
+
+	dev = malloc(sizeof(ddf_dev_t));
 	if (dev == NULL)
 		return NULL;
 
-	memset(dev, 0, sizeof(device_t));
+	memset(dev, 0, sizeof(ddf_dev_t));
 	return dev;
 }
@@ -477,9 +478,9 @@
  * @return		The device structure.
  */
-static function_t *create_function(void)
-{
-	function_t *fun;
-
-	fun = calloc(1, sizeof(function_t));
+static ddf_fun_t *create_function(void)
+{
+	ddf_fun_t *fun;
+
+	fun = calloc(1, sizeof(ddf_fun_t));
 	if (fun == NULL)
 		return NULL;
@@ -495,5 +496,5 @@
  * @param dev		The device structure.
  */
-static void delete_device(device_t *dev)
+static void delete_device(ddf_dev_t *dev)
 {
 	free(dev);
@@ -504,5 +505,5 @@
  * @param dev		The device structure.
  */
-static void delete_function(function_t *fun)
+static void delete_function(ddf_fun_t *fun)
 {
 	clean_match_ids(&fun->match_ids);
@@ -535,7 +536,7 @@
  * @return		New function or @c NULL if memory is not available
  */
-function_t *ddf_fun_create(device_t *dev, fun_type_t ftype, const char *name)
-{
-	function_t *fun;
+ddf_fun_t *ddf_fun_create(ddf_dev_t *dev, fun_type_t ftype, const char *name)
+{
+	ddf_fun_t *fun;
 
 	fun = create_function();
@@ -563,5 +564,5 @@
  * @param fun		Function to destroy
  */
-void ddf_fun_destroy(function_t *fun)
+void ddf_fun_destroy(ddf_fun_t *fun)
 {
 	assert(fun->bound == false);
@@ -569,5 +570,5 @@
 }
 
-void *function_get_ops(function_t *fun, dev_inferface_idx_t idx)
+void *function_get_ops(ddf_fun_t *fun, dev_inferface_idx_t idx)
 {
 	assert(is_valid_iface_idx(idx));
@@ -589,5 +590,5 @@
  * @return		EOK on success or negative error code
  */
-int ddf_fun_bind(function_t *fun)
+int ddf_fun_bind(ddf_fun_t *fun)
 {
 	assert(fun->name != NULL);
@@ -617,5 +618,5 @@
  * @return			EOK on success, ENOMEM if out of memory.
  */
-int ddf_fun_add_match_id(function_t *fun, const char *match_id_str,
+int ddf_fun_add_match_id(ddf_fun_t *fun, const char *match_id_str,
     int match_score)
 {
@@ -637,5 +638,5 @@
 
 /** Get default handler for client requests */
-remote_handler_t *function_get_default_handler(function_t *fun)
+remote_handler_t *function_get_default_handler(ddf_fun_t *fun)
 {
 	if (fun->ops == NULL)
@@ -648,5 +649,5 @@
  * Must only be called when the function is bound.
  */
-int add_function_to_class(function_t *fun, const char *class_name)
+int ddf_fun_add_to_class(ddf_fun_t *fun, const char *class_name)
 {
 	assert(fun->bound == true);
@@ -656,5 +657,5 @@
 }
 
-int driver_main(driver_t *drv)
+int ddf_driver_main(driver_t *drv)
 {
 	/*
Index: uspace/lib/drv/generic/remote_char_dev.c
===================================================================
--- uspace/lib/drv/generic/remote_char_dev.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/lib/drv/generic/remote_char_dev.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -41,6 +41,6 @@
 #define MAX_CHAR_RW_COUNT 256
 
-static void remote_char_read(function_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_char_write(function_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_char_read(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_char_write(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
 
 /** Remote character interface operations. */
@@ -71,5 +71,5 @@
  */
 static void
-remote_char_read(function_t *fun, void *ops, ipc_callid_t callid,
+remote_char_read(ddf_fun_t *fun, void *ops, ipc_callid_t callid,
     ipc_call_t *call)
 {
@@ -118,5 +118,5 @@
  */
 static void
-remote_char_write(function_t *fun, void *ops, ipc_callid_t callid,
+remote_char_write(ddf_fun_t *fun, void *ops, ipc_callid_t callid,
     ipc_call_t *call)
 {
Index: uspace/lib/drv/generic/remote_hw_res.c
===================================================================
--- uspace/lib/drv/generic/remote_hw_res.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/lib/drv/generic/remote_hw_res.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -39,7 +39,7 @@
 #include "driver.h"
 
-static void remote_hw_res_get_resource_list(function_t *, void *, ipc_callid_t,
+static void remote_hw_res_get_resource_list(ddf_fun_t *, void *, ipc_callid_t,
     ipc_call_t *);
-static void remote_hw_res_enable_interrupt(function_t *, void *, ipc_callid_t,
+static void remote_hw_res_enable_interrupt(ddf_fun_t *, void *, ipc_callid_t,
     ipc_call_t *);
 
@@ -55,5 +55,5 @@
 };
 
-static void remote_hw_res_enable_interrupt(function_t *fun, void *ops,
+static void remote_hw_res_enable_interrupt(ddf_fun_t *fun, void *ops,
     ipc_callid_t callid, ipc_call_t *call)
 {
@@ -68,5 +68,5 @@
 }
 
-static void remote_hw_res_get_resource_list(function_t *fun, void *ops,
+static void remote_hw_res_get_resource_list(ddf_fun_t *fun, void *ops,
     ipc_callid_t callid, ipc_call_t *call)
 {
Index: uspace/lib/drv/include/dev_iface.h
===================================================================
--- uspace/lib/drv/include/dev_iface.h	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/lib/drv/include/dev_iface.h	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -43,5 +43,5 @@
  */
 
-struct function;
+struct ddf_fun;
 
 /*
@@ -49,8 +49,8 @@
  * devices driver.
  */
-typedef void remote_iface_func_t(struct function *, void *, ipc_callid_t,
+typedef void remote_iface_func_t(struct ddf_fun *, void *, ipc_callid_t,
     ipc_call_t *);
 typedef remote_iface_func_t *remote_iface_func_ptr_t;
-typedef void remote_handler_t(struct function *, ipc_callid_t, ipc_call_t *);
+typedef void remote_handler_t(struct ddf_fun *, ipc_callid_t, ipc_call_t *);
 
 typedef struct {
Index: uspace/lib/drv/include/driver.h
===================================================================
--- uspace/lib/drv/include/driver.h	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/lib/drv/include/driver.h	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -49,9 +49,6 @@
 #include "dev_iface.h"
 
-struct device;
-typedef struct device device_t;
-
-struct function;
-typedef struct function function_t;
+typedef struct ddf_dev ddf_dev_t;
+typedef struct ddf_fun ddf_fun_t;
 
 /*
@@ -60,10 +57,10 @@
 
 /** Devices operations */
-typedef struct device_ops {
+typedef struct ddf_dev_ops {
 	/**
 	 * Optional callback function called when a client is connecting to the
 	 * device.
 	 */
-	int (*open)(function_t *);
+	int (*open)(ddf_fun_t *);
 	
 	/**
@@ -71,5 +68,5 @@
 	 * the device.
 	 */
-	void (*close)(function_t *);
+	void (*close)(ddf_fun_t *);
 	
 	/** The table of standard interfaces implemented by the device. */
@@ -82,6 +79,5 @@
 	 */
 	remote_handler_t *default_handler;
-} device_ops_t;
-
+} ddf_dev_ops_t;
 
 /*
@@ -90,5 +86,5 @@
 
 /** Device structure */
-struct device {
+struct ddf_dev {
 	/**
 	 * Globally unique device identifier (assigned to the device by the
@@ -114,5 +110,5 @@
 
 /** Function structure */
-struct function {
+struct ddf_fun {
 	/** True if bound to the device manager */
 	bool bound;
@@ -121,5 +117,5 @@
 	
 	/** Device which this function belogs to */
-	device_t *dev;
+	ddf_dev_t *dev;
 	
 	/** Function type */
@@ -132,5 +128,5 @@
 	void *driver_data;
 	/** Implementation of operations provided by this function */
-	device_ops_t *ops;
+	ddf_dev_ops_t *ops;
 	
 	/** Link in the list of functions handled by the driver */
@@ -145,5 +141,5 @@
 typedef struct driver_ops {
 	/** Callback method for passing a new device to the device driver */
-	int (*add_device)(device_t *dev);
+	int (*add_device)(ddf_dev_t *dev);
 	/* TODO: add other generic driver operations */
 } driver_ops_t;
@@ -157,12 +153,12 @@
 } driver_t;
 
-int driver_main(driver_t *);
-
-extern function_t *ddf_fun_create(device_t *, fun_type_t, const char *);
-extern void ddf_fun_destroy(function_t *);
-extern int ddf_fun_bind(function_t *);
-extern int ddf_fun_add_match_id(function_t *, const char *, int);
-
-extern void *function_get_ops(function_t *, dev_inferface_idx_t);
+int ddf_driver_main(driver_t *);
+
+extern ddf_fun_t *ddf_fun_create(ddf_dev_t *, fun_type_t, const char *);
+extern void ddf_fun_destroy(ddf_fun_t *);
+extern int ddf_fun_bind(ddf_fun_t *);
+extern int ddf_fun_add_match_id(ddf_fun_t *, const char *, int);
+
+extern void *function_get_ops(ddf_fun_t *, dev_inferface_idx_t);
 
 /*
@@ -170,9 +166,9 @@
  */
 
-typedef void interrupt_handler_t(device_t *, ipc_callid_t, ipc_call_t *);
+typedef void interrupt_handler_t(ddf_dev_t *, ipc_callid_t, ipc_call_t *);
 
 typedef struct interrupt_context {
 	int id;
-	device_t *dev;
+	ddf_dev_t *dev;
 	int irq;
 	interrupt_handler_t *handler;
@@ -196,12 +192,12 @@
     interrupt_context_list_t *, int);
 extern interrupt_context_t *find_interrupt_context(
-    interrupt_context_list_t *, device_t *, int);
-
-extern int register_interrupt_handler(device_t *, int, interrupt_handler_t *,
+    interrupt_context_list_t *, ddf_dev_t *, int);
+
+extern int register_interrupt_handler(ddf_dev_t *, int, interrupt_handler_t *,
     irq_code_t *);
-extern int unregister_interrupt_handler(device_t *, int);
-
-extern remote_handler_t *function_get_default_handler(function_t *);
-extern int add_function_to_class(function_t *fun, const char *class_name);
+extern int unregister_interrupt_handler(ddf_dev_t *, int);
+
+extern remote_handler_t *function_get_default_handler(ddf_fun_t *);
+extern int ddf_fun_add_to_class(ddf_fun_t *fun, const char *class_name);
 
 #endif
Index: uspace/lib/drv/include/ops/char_dev.h
===================================================================
--- uspace/lib/drv/include/ops/char_dev.h	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/lib/drv/include/ops/char_dev.h	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -39,6 +39,6 @@
 
 typedef struct {
-	int (*read)(function_t *, char *, size_t);
-	int (*write)(function_t *, char *, size_t);
+	int (*read)(ddf_fun_t *, char *, size_t);
+	int (*write)(ddf_fun_t *, char *, size_t);
 } char_dev_ops_t;
 
Index: uspace/lib/drv/include/ops/hw_res.h
===================================================================
--- uspace/lib/drv/include/ops/hw_res.h	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/lib/drv/include/ops/hw_res.h	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -42,6 +42,6 @@
 
 typedef struct {
-	 hw_resource_list_t *(*get_resource_list)(function_t *);
-	 bool (*enable_interrupt)(function_t *);
+	 hw_resource_list_t *(*get_resource_list)(ddf_fun_t *);
+	 bool (*enable_interrupt)(ddf_fun_t *);
 } hw_res_ops_t;
 
