Index: uspace/drv/isa/isa.c
===================================================================
--- uspace/drv/isa/isa.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/isa/isa.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -68,9 +68,9 @@
 
 typedef struct isa_fun {
-	function_t *fnode;
+	ddf_fun_t *fnode;
 	hw_resource_list_t hw_resources;
 } isa_fun_t;
 
-static hw_resource_list_t *isa_get_fun_resources(function_t *fnode)
+static hw_resource_list_t *isa_get_fun_resources(ddf_fun_t *fnode)
 {
 	isa_fun_t *fun = ISA_FUN(fnode);
@@ -80,5 +80,5 @@
 }
 
-static bool isa_enable_fun_interrupt(function_t *fnode)
+static bool isa_enable_fun_interrupt(ddf_fun_t *fnode)
 {
 	// TODO
@@ -92,7 +92,7 @@
 };
 
-static device_ops_t isa_fun_ops;
-
-static int isa_add_device(device_t *dev);
+static ddf_dev_ops_t isa_fun_ops;
+
+static int isa_add_device(ddf_dev_t *dev);
 
 /** The isa device driver's standard operations */
@@ -107,5 +107,5 @@
 };
 
-static isa_fun_t *isa_fun_create(device_t *dev, const char *name)
+static isa_fun_t *isa_fun_create(ddf_dev_t *dev, const char *name)
 {
 	isa_fun_t *fun = calloc(1, sizeof(isa_fun_t));
@@ -113,5 +113,5 @@
 		return NULL;
 
-	function_t *fnode = ddf_fun_create(dev, fun_inner, name);
+	ddf_fun_t *fnode = ddf_fun_create(dev, fun_inner, name);
 	if (fnode == NULL) {
 		free(fun);
@@ -388,5 +388,5 @@
 }
 
-static char *isa_fun_read_info(char *fun_conf, device_t *dev)
+static char *isa_fun_read_info(char *fun_conf, ddf_dev_t *dev)
 {
 	char *line;
@@ -447,5 +447,5 @@
 }
 
-static void fun_conf_parse(char *conf, device_t *dev)
+static void fun_conf_parse(char *conf, ddf_dev_t *dev)
 {
 	while (conf != NULL && *conf != '\0') {
@@ -454,5 +454,5 @@
 }
 
-static void isa_functions_add(device_t *dev)
+static void isa_functions_add(ddf_dev_t *dev)
 {
 	char *fun_conf;
@@ -465,5 +465,5 @@
 }
 
-static int isa_add_device(device_t *dev)
+static int isa_add_device(ddf_dev_t *dev)
 {
 	printf(NAME ": isa_add_device, device handle = %d\n",
@@ -473,5 +473,5 @@
 	printf(NAME ": adding a 'ctl' function\n");
 
-	function_t *ctl = ddf_fun_create(dev, fun_exposed, "ctl");
+	ddf_fun_t *ctl = ddf_fun_create(dev, fun_exposed, "ctl");
 	if (ctl == NULL) {
 		printf(NAME ": Error creating control function.\n");
@@ -500,5 +500,5 @@
 	printf(NAME ": HelenOS ISA bus driver\n");
 	isa_init();
-	return driver_main(&isa_driver);
+	return ddf_driver_main(&isa_driver);
 }
 
Index: uspace/drv/ns8250/ns8250.c
===================================================================
--- uspace/drv/ns8250/ns8250.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/ns8250/ns8250.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -94,7 +94,7 @@
 typedef struct ns8250 {
 	/** DDF device node */
-	device_t *dev;
+	ddf_dev_t *dev;
 	/** DDF function node */
-	function_t *fun;
+	ddf_fun_t *fun;
 	/** Is there any client conntected to the device? */
 	bool client_connected;
@@ -189,5 +189,5 @@
  *			error number otherwise.
  */
-static int ns8250_read(function_t *fun, char *buf, size_t count)
+static int ns8250_read(ddf_fun_t *fun, char *buf, size_t count)
 {
 	ns8250_t *ns = NS8250(fun);
@@ -223,5 +223,5 @@
  * @return		Zero on success
  */
-static int ns8250_write(function_t *fun, char *buf, size_t count)
+static int ns8250_write(ddf_fun_t *fun, char *buf, size_t count)
 {
 	ns8250_t *ns = NS8250(fun);
@@ -234,5 +234,5 @@
 }
 
-static device_ops_t ns8250_dev_ops;
+static ddf_dev_ops_t ns8250_dev_ops;
 
 /** The character interface's callbacks. */
@@ -242,5 +242,5 @@
 };
 
-static int ns8250_add_device(device_t *dev);
+static int ns8250_add_device(ddf_dev_t *dev);
 
 /** The serial port device driver's standard operations. */
@@ -675,5 +675,5 @@
  * @param dev		The serial port device.
  */
-static inline void ns8250_interrupt_handler(device_t *dev, ipc_callid_t iid,
+static inline void ns8250_interrupt_handler(ddf_dev_t *dev, ipc_callid_t iid,
     ipc_call_t *icall)
 {
@@ -706,8 +706,8 @@
  * @param dev		The serial port device.
  */
-static int ns8250_add_device(device_t *dev)
+static int ns8250_add_device(ddf_dev_t *dev)
 {
 	ns8250_t *ns = NULL;
-	function_t *fun = NULL;
+	ddf_fun_t *fun = NULL;
 	bool need_cleanup = false;
 	int rc;
@@ -777,5 +777,5 @@
 	ns->fun = fun;
 	
-	add_function_to_class(fun, "serial");
+	ddf_fun_add_to_class(fun, "serial");
 	
 	printf(NAME ": the %s device has been successfully initialized.\n",
@@ -800,5 +800,5 @@
  * @param dev		The device.
  */
-static int ns8250_open(function_t *fun)
+static int ns8250_open(ddf_fun_t *fun)
 {
 	ns8250_t *data = (ns8250_t *) fun->dev->driver_data;
@@ -824,5 +824,5 @@
  * @param dev		The device.
  */
-static void ns8250_close(function_t *fun)
+static void ns8250_close(ddf_fun_t *fun)
 {
 	ns8250_t *data = (ns8250_t *) fun->dev->driver_data;
@@ -848,5 +848,5 @@
  */
 static void
-ns8250_get_props(device_t *dev, unsigned int *baud_rate, unsigned int *parity,
+ns8250_get_props(ddf_dev_t *dev, unsigned int *baud_rate, unsigned int *parity,
     unsigned int *word_length, unsigned int* stop_bits)
 {
@@ -875,5 +875,5 @@
  * @param stop_bits	The number of stop bits to be used.
  */
-static int ns8250_set_props(device_t *dev, unsigned int baud_rate,
+static int ns8250_set_props(ddf_dev_t *dev, unsigned int baud_rate,
     unsigned int parity, unsigned int word_length, unsigned int stop_bits)
 {
@@ -902,5 +902,5 @@
  * Configure the parameters of the serial communication.
  */
-static void ns8250_default_handler(function_t *fun, ipc_callid_t callid,
+static void ns8250_default_handler(ddf_fun_t *fun, ipc_callid_t callid,
     ipc_call_t *call)
 {
@@ -950,5 +950,5 @@
 	printf(NAME ": HelenOS serial port driver\n");
 	ns8250_init();
-	return driver_main(&ns8250_driver);
+	return ddf_driver_main(&ns8250_driver);
 }
 
Index: uspace/drv/pciintel/pci.c
===================================================================
--- uspace/drv/pciintel/pci.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/pciintel/pci.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -72,5 +72,5 @@
 #define PCI_BUS_FROM_FUN(fun) ((fun)->busptr)
 
-static hw_resource_list_t *pciintel_get_resources(function_t *fnode)
+static hw_resource_list_t *pciintel_get_resources(ddf_fun_t *fnode)
 {
 	pci_fun_t *fun = PCI_FUN(fnode);
@@ -81,5 +81,5 @@
 }
 
-static bool pciintel_enable_interrupt(function_t *fnode)
+static bool pciintel_enable_interrupt(ddf_fun_t *fnode)
 {
 	/* TODO */
@@ -93,7 +93,7 @@
 };
 
-static device_ops_t pci_fun_ops;
-
-static int pci_add_device(device_t *);
+static ddf_dev_ops_t pci_fun_ops;
+
+static int pci_add_device(ddf_dev_t *);
 
 /** PCI bus driver standard operations */
@@ -367,5 +367,5 @@
 void pci_bus_scan(pci_bus_t *bus, int bus_num) 
 {
-	function_t *fnode;
+	ddf_fun_t *fnode;
 	pci_fun_t *fun;
 	
@@ -459,8 +459,8 @@
 }
 
-static int pci_add_device(device_t *dnode)
+static int pci_add_device(ddf_dev_t *dnode)
 {
 	pci_bus_t *bus = NULL;
-	function_t *ctl = NULL;
+	ddf_fun_t *ctl = NULL;
 	bool got_res = false;
 	int rc;
@@ -633,5 +633,5 @@
 	printf(NAME ": HelenOS pci bus driver (intel method 1).\n");
 	pciintel_init();
-	return driver_main(&pci_driver);
+	return ddf_driver_main(&pci_driver);
 }
 
Index: uspace/drv/pciintel/pci.h
===================================================================
--- uspace/drv/pciintel/pci.h	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/pciintel/pci.h	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -47,5 +47,5 @@
 typedef struct pciintel_bus {
 	/** DDF device node */
-	device_t *dnode;
+	ddf_dev_t *dnode;
 	uint32_t conf_io_addr;
 	void *conf_data_port;
@@ -56,5 +56,5 @@
 typedef struct pci_fun_data {
 	pci_bus_t *busptr;
-	function_t *fnode;
+	ddf_fun_t *fnode;
 
 	int bus;
Index: uspace/drv/root/root.c
===================================================================
--- uspace/drv/root/root.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/root/root.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -65,5 +65,5 @@
 #define VIRTUAL_FUN_MATCH_SCORE 100
 
-static int root_add_device(device_t *dev);
+static int root_add_device(ddf_dev_t *dev);
 
 /** The root device driver's standard operations. */
@@ -83,8 +83,8 @@
  * @return	EOK on success or negative error code
  */
-static int add_virtual_root_fun(device_t *dev)
+static int add_virtual_root_fun(ddf_dev_t *dev)
 {
 	const char *name = VIRTUAL_FUN_NAME;
-	function_t *fun;
+	ddf_fun_t *fun;
 	int rc;
 
@@ -123,5 +123,5 @@
  * @return	EOK on success or negative error code
  */
-static int add_platform_fun(device_t *dev)
+static int add_platform_fun(ddf_dev_t *dev)
 {
 	char *match_id;
@@ -130,5 +130,5 @@
 
 	const char *name = PLATFORM_FUN_NAME;
-	function_t *fun;
+	ddf_fun_t *fun;
 	int rc;
 
@@ -189,5 +189,5 @@
  *			of HW and pseudo devices).
  */
-static int root_add_device(device_t *dev)
+static int root_add_device(ddf_dev_t *dev)
 {
 	printf(NAME ": root_add_device, device handle=%" PRIun "\n",
@@ -212,5 +212,5 @@
 {
 	printf(NAME ": HelenOS root device driver\n");
-	return driver_main(&root_driver);
+	return ddf_driver_main(&root_driver);
 }
 
Index: uspace/drv/rootpc/rootpc.c
===================================================================
--- uspace/drv/rootpc/rootpc.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/rootpc/rootpc.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -62,5 +62,5 @@
 } rootpc_fun_t;
 
-static int rootpc_add_device(device_t *dev);
+static int rootpc_add_device(ddf_dev_t *dev);
 static void root_pc_init(void);
 
@@ -92,5 +92,5 @@
 };
 
-static hw_resource_list_t *rootpc_get_resources(function_t *fnode)
+static hw_resource_list_t *rootpc_get_resources(ddf_fun_t *fnode)
 {
 	rootpc_fun_t *fun = ROOTPC_FUN(fnode);
@@ -100,5 +100,5 @@
 }
 
-static bool rootpc_enable_interrupt(function_t *fun)
+static bool rootpc_enable_interrupt(ddf_fun_t *fun)
 {
 	/* TODO */
@@ -113,13 +113,13 @@
 
 /* Initialized in root_pc_init() function. */
-static device_ops_t rootpc_fun_ops;
+static ddf_dev_ops_t rootpc_fun_ops;
 
 static bool
-rootpc_add_fun(device_t *dev, const char *name, const char *str_match_id,
+rootpc_add_fun(ddf_dev_t *dev, const char *name, const char *str_match_id,
     rootpc_fun_t *fun)
 {
 	printf(NAME ": adding new function '%s'.\n", name);
 	
-	function_t *fnode = NULL;
+	ddf_fun_t *fnode = NULL;
 	match_id_t *match_id = NULL;
 	
@@ -164,5 +164,5 @@
 }
 
-static bool rootpc_add_functions(device_t *dev)
+static bool rootpc_add_functions(ddf_dev_t *dev)
 {
 	return rootpc_add_fun(dev, "pci0", "intel_pci", &pci_data);
@@ -175,5 +175,5 @@
  * @return		Zero on success, negative error number otherwise.
  */
-static int rootpc_add_device(device_t *dev)
+static int rootpc_add_device(ddf_dev_t *dev)
 {
 	printf(NAME ": rootpc_add_device, device handle = %d\n",
@@ -197,5 +197,5 @@
 	printf(NAME ": HelenOS PC platform driver\n");
 	root_pc_init();
-	return driver_main(&rootpc_driver);
+	return ddf_driver_main(&rootpc_driver);
 }
 
Index: uspace/drv/rootvirt/rootvirt.c
===================================================================
--- uspace/drv/rootvirt/rootvirt.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/rootvirt/rootvirt.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -61,5 +61,5 @@
 };
 
-static int rootvirt_add_device(device_t *dev);
+static int rootvirt_add_device(ddf_dev_t *dev);
 
 static driver_ops_t rootvirt_ops = {
@@ -78,7 +78,7 @@
  * @return		EOK on success or negative error code.
  */
-static int rootvirt_add_fun(device_t *vdev, virtual_function_t *vfun)
+static int rootvirt_add_fun(ddf_dev_t *vdev, virtual_function_t *vfun)
 {
-	function_t *fun;
+	ddf_fun_t *fun;
 	int rc;
 
@@ -112,5 +112,5 @@
 }
 
-static int rootvirt_add_device(device_t *dev)
+static int rootvirt_add_device(ddf_dev_t *dev)
 {
 	static int instances = 0;
@@ -142,5 +142,5 @@
 {
 	printf(NAME ": HelenOS virtual devices root driver\n");
-	return driver_main(&rootvirt_driver);
+	return ddf_driver_main(&rootvirt_driver);
 }
 
Index: uspace/drv/test1/char.c
===================================================================
--- uspace/drv/test1/char.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/test1/char.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -37,10 +37,10 @@
 #include "test1.h"
 
-static int impl_char_read(function_t *fun, char *buf, size_t count) {
+static int impl_char_read(ddf_fun_t *fun, char *buf, size_t count) {
 	memset(buf, 0, count);
 	return count;
 }
 
-static int imp_char_write(function_t *fun, char *buf, size_t count) {
+static int imp_char_write(ddf_fun_t *fun, char *buf, size_t count) {
 	return count;
 }
@@ -51,5 +51,5 @@
 };
 
-device_ops_t char_device_ops = {
+ddf_dev_ops_t char_device_ops = {
 	.interfaces[CHAR_DEV_IFACE] = &char_dev_ops
 };
Index: uspace/drv/test1/test1.c
===================================================================
--- uspace/drv/test1/test1.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/test1/test1.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -36,5 +36,5 @@
 #include "test1.h"
 
-static int test1_add_device(device_t *dev);
+static int test1_add_device(ddf_dev_t *dev);
 
 static driver_ops_t driver_ops = {
@@ -55,8 +55,8 @@
  * @param score Device match score.
  */
-static int register_fun_verbose(device_t *parent, const char *message,
+static int register_fun_verbose(ddf_dev_t *parent, const char *message,
     const char *name, const char *match_id, int match_score)
 {
-	function_t *fun;
+	ddf_fun_t *fun;
 	int rc;
 
@@ -105,7 +105,7 @@
  * @return Error code reporting success of the operation.
  */
-static int test1_add_device(device_t *dev)
+static int test1_add_device(ddf_dev_t *dev)
 {
-	function_t *fun_a;
+	ddf_fun_t *fun_a;
 	int rc;
 
@@ -125,9 +125,9 @@
 	}
 
-	add_function_to_class(fun_a, "virtual");
+	ddf_fun_add_to_class(fun_a, "virtual");
 
 	if (str_cmp(dev->name, "null") == 0) {
 		fun_a->ops = &char_device_ops;
-		add_function_to_class(fun_a, "virt-null");
+		ddf_fun_add_to_class(fun_a, "virt-null");
 	} else if (str_cmp(dev->name, "test1") == 0) {
 		(void) register_fun_verbose(dev, "cloning myself ;-)", "clone",
@@ -146,5 +146,5 @@
 {
 	printf(NAME ": HelenOS test1 virtual device driver\n");
-	return driver_main(&test1_driver);
+	return ddf_driver_main(&test1_driver);
 }
 
Index: uspace/drv/test1/test1.h
===================================================================
--- uspace/drv/test1/test1.h	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/test1/test1.h	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -36,5 +36,5 @@
 #define NAME "test1"
 
-extern device_ops_t char_device_ops;
+extern ddf_dev_ops_t char_device_ops;
 
 #endif
Index: uspace/drv/test2/test2.c
===================================================================
--- uspace/drv/test2/test2.c	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/drv/test2/test2.c	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -38,5 +38,5 @@
 #define NAME "test2"
 
-static int test2_add_device(device_t *dev);
+static int test2_add_device(ddf_dev_t *dev);
 
 static driver_ops_t driver_ops = {
@@ -57,8 +57,8 @@
  * @param score Device match score.
  */
-static int register_fun_verbose(device_t *parent, const char *message,
+static int register_fun_verbose(ddf_dev_t *parent, const char *message,
     const char *name, const char *match_id, int match_score)
 {
-	function_t *fun;
+	ddf_fun_t *fun;
 	int rc;
 
@@ -92,11 +92,11 @@
 /** Add child devices after some sleep.
  *
- * @param arg Parent device structure (device_t *).
+ * @param arg Parent device structure (ddf_dev_t *).
  * @return Always EOK.
  */
 static int postponed_birth(void *arg)
 {
-	device_t *dev = (device_t *) arg;
-	function_t *fun_a;
+	ddf_dev_t *dev = (ddf_dev_t *) arg;
+	ddf_fun_t *fun_a;
 	int rc;
 
@@ -120,10 +120,10 @@
 	}
 
-	add_function_to_class(fun_a, "virtual");
+	ddf_fun_add_to_class(fun_a, "virtual");
 
 	return EOK;
 }
 
-static int test2_add_device(device_t *dev)
+static int test2_add_device(ddf_dev_t *dev)
 {
 	printf(NAME ": test2_add_device(name=\"%s\", handle=%d)\n",
@@ -148,5 +148,5 @@
 {
 	printf(NAME ": HelenOS test2 virtual device driver\n");
-	return driver_main(&test2_driver);
+	return ddf_driver_main(&test2_driver);
 }
 
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;
 
Index: uspace/srv/devman/devman.h
===================================================================
--- uspace/srv/devman/devman.h	(revision 34588a80f796edeaf1b6a0178561fbb8f88ffc4f)
+++ uspace/srv/devman/devman.h	(revision 83a2f43b8c77839e3668e5f7c14333b3d1935d64)
@@ -161,5 +161,5 @@
 	dev_node_t *dev;
 	
-	/** Link to list of functions in the device (device_t.functions) */
+	/** Link to list of functions in the device (ddf_dev_t.functions) */
 	link_t dev_functions;
 	
