Index: uspace/drv/platform/amdm37x/amdm37x.c
===================================================================
--- uspace/drv/platform/amdm37x/amdm37x.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/amdm37x/amdm37x.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -53,8 +53,8 @@
 
 
-int amdm37x_init(amdm37x_t *device, bool trace)
+errno_t amdm37x_init(amdm37x_t *device, bool trace)
 {
 	assert(device);
-	int ret = EOK;
+	errno_t ret = EOK;
 
 	ret = pio_enable((void*)USBHOST_CM_BASE_ADDRESS, USBHOST_CM_SIZE,
@@ -358,5 +358,5 @@
  * Select mode than can operate in FS/LS.
  */
-int amdm37x_usb_tll_init(amdm37x_t *device)
+errno_t amdm37x_usb_tll_init(amdm37x_t *device)
 {
 	/* Check access */
Index: uspace/drv/platform/amdm37x/amdm37x.h
===================================================================
--- uspace/drv/platform/amdm37x/amdm37x.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/amdm37x/amdm37x.h	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -66,6 +66,6 @@
 } amdm37x_t;
 
-int amdm37x_init(amdm37x_t *device, bool trace_io);
-int amdm37x_usb_tll_init(amdm37x_t *device);
+errno_t amdm37x_init(amdm37x_t *device, bool trace_io);
+errno_t amdm37x_usb_tll_init(amdm37x_t *device);
 void amdm37x_setup_dpll_on_autoidle(amdm37x_t *device);
 void amdm37x_usb_clocks_set(amdm37x_t *device, bool enabled);
Index: uspace/drv/platform/amdm37x/main.c
===================================================================
--- uspace/drv/platform/amdm37x/main.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/amdm37x/main.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -150,5 +150,5 @@
 
 static hw_resource_list_t *amdm37x_get_resources(ddf_fun_t *fnode);
-static int amdm37x_enable_interrupt(ddf_fun_t *fun, int);
+static errno_t amdm37x_enable_interrupt(ddf_fun_t *fun, int);
 
 static hw_res_ops_t fun_hw_res_ops = {
@@ -161,5 +161,5 @@
 };
 
-static int amdm37x_add_fun(ddf_dev_t *dev, const amdm37x_fun_t *fun)
+static errno_t amdm37x_add_fun(ddf_dev_t *dev, const amdm37x_fun_t *fun)
 {
 	assert(dev);
@@ -174,5 +174,5 @@
 	
 	/* Add match id */
-	int ret = ddf_fun_add_match_id(fnode,
+	errno_t ret = ddf_fun_add_match_id(fnode,
 	    fun->match_id.id, fun->match_id.score);
 	if (ret != EOK) {
@@ -212,5 +212,5 @@
  *
  */
-static int amdm37x_dev_add(ddf_dev_t *dev)
+static errno_t amdm37x_dev_add(ddf_dev_t *dev)
 {
 	assert(dev);
@@ -218,5 +218,5 @@
 	if (!device)
 		return ENOMEM;
-	int ret = amdm37x_init(device, DEBUG_CM);
+	errno_t ret = amdm37x_init(device, DEBUG_CM);
 	if (ret != EOK) {
 		ddf_msg(LVL_FATAL, "Failed to setup hw access!.\n");
@@ -265,5 +265,5 @@
 }
 
-static int amdm37x_enable_interrupt(ddf_fun_t *fun, int irq)
+static errno_t amdm37x_enable_interrupt(ddf_fun_t *fun, int irq)
 {
 	//TODO: Implement
Index: uspace/drv/platform/icp/icp.c
===================================================================
--- uspace/drv/platform/icp/icp.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/icp/icp.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -62,5 +62,5 @@
 } icp_fun_t;
 
-static int icp_dev_add(ddf_dev_t *dev);
+static errno_t icp_dev_add(ddf_dev_t *dev);
 
 static driver_ops_t icp_ops = {
@@ -178,5 +178,5 @@
 }
 
-static int icp_fun_enable_interrupt(ddf_fun_t *fnode, int irq)
+static errno_t icp_fun_enable_interrupt(ddf_fun_t *fnode, int irq)
 {
 	icp_fun_t *fun = icp_fun(fnode);
@@ -188,5 +188,5 @@
 }
 
-static int icp_fun_disable_interrupt(ddf_fun_t *fnode, int irq)
+static errno_t icp_fun_disable_interrupt(ddf_fun_t *fnode, int irq)
 {
 	icp_fun_t *fun = icp_fun(fnode);
@@ -198,5 +198,5 @@
 }
 
-static int icp_fun_clear_interrupt(ddf_fun_t *fnode, int irq)
+static errno_t icp_fun_clear_interrupt(ddf_fun_t *fnode, int irq)
 {
 	icp_fun_t *fun = icp_fun(fnode);
@@ -231,5 +231,5 @@
 };
 
-static int icp_add_fun(ddf_dev_t *dev, const char *name, const char *str_match_id,
+static errno_t icp_add_fun(ddf_dev_t *dev, const char *name, const char *str_match_id,
     icp_fun_t *fun_proto)
 {
@@ -237,5 +237,5 @@
 
 	ddf_fun_t *fnode = NULL;
-	int rc;
+	errno_t rc;
 
 	/* Create new device. */
@@ -275,7 +275,7 @@
 }
 
-static int icp_add_functions(ddf_dev_t *dev)
-{
-	int rc;
+static errno_t icp_add_functions(ddf_dev_t *dev)
+{
+	errno_t rc;
 
 	rc = icp_add_fun(dev, "intctl", "integratorcp/intctl",
@@ -296,5 +296,5 @@
 
 /** Add device. */
-static int icp_dev_add(ddf_dev_t *dev)
+static errno_t icp_dev_add(ddf_dev_t *dev)
 {
 	ddf_msg(LVL_NOTE, "icp_dev_add, device handle = %d",
@@ -311,5 +311,5 @@
 int main(int argc, char *argv[])
 {
-	int rc;
+	errno_t rc;
 
 	printf(NAME ": HelenOS IntegratorCP platform driver\n");
Index: uspace/drv/platform/mac/mac.c
===================================================================
--- uspace/drv/platform/mac/mac.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/mac/mac.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -132,5 +132,5 @@
 	
 	ddf_fun_t *fnode = NULL;
-	int rc;
+	errno_t rc;
 	
 	/* Create new device. */
@@ -176,7 +176,7 @@
  *
  */
-static int mac_dev_add(ddf_dev_t *dev)
-{
-	int rc;
+static errno_t mac_dev_add(ddf_dev_t *dev)
+{
+	errno_t rc;
 	uintptr_t cuda_physical;
 	sysarg_t cuda_inr;
@@ -227,5 +227,5 @@
 }
 
-static int mac_enable_interrupt(ddf_fun_t *fun, int irq)
+static errno_t mac_enable_interrupt(ddf_fun_t *fun, int irq)
 {
 	/* TODO */
Index: uspace/drv/platform/malta/malta.c
===================================================================
--- uspace/drv/platform/malta/malta.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/malta/malta.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -77,5 +77,5 @@
 } malta_fun_t;
 
-static int malta_dev_add(ddf_dev_t *dev);
+static errno_t malta_dev_add(ddf_dev_t *dev);
 static void malta_init(void);
 
@@ -143,5 +143,5 @@
 }
 
-static int malta_enable_interrupt(ddf_fun_t *fun, int irq)
+static errno_t malta_enable_interrupt(ddf_fun_t *fun, int irq)
 {
 	/* TODO */
@@ -177,5 +177,5 @@
 	
 	ddf_fun_t *fnode = NULL;
-	int rc;
+	errno_t rc;
 	
 	/* Create new device. */
@@ -223,9 +223,9 @@
  * @return		Zero on success, error number otherwise.
  */
-static int malta_dev_add(ddf_dev_t *dev)
+static errno_t malta_dev_add(ddf_dev_t *dev)
 {
 	ioport32_t *gt;
 	uint32_t val;
-	int ret;
+	errno_t ret;
 
 	ddf_msg(LVL_DEBUG, "malta_dev_add, device handle = %d",
Index: uspace/drv/platform/msim/msim.c
===================================================================
--- uspace/drv/platform/msim/msim.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/msim/msim.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -62,5 +62,5 @@
 } msim_fun_t;
 
-static int msim_dev_add(ddf_dev_t *dev);
+static errno_t msim_dev_add(ddf_dev_t *dev);
 static void msim_init(void);
 
@@ -152,5 +152,5 @@
 }
 
-static int msim_enable_interrupt(ddf_fun_t *fun, int irq)
+static errno_t msim_enable_interrupt(ddf_fun_t *fun, int irq)
 {
 	/* Nothing to do. */
@@ -186,5 +186,5 @@
 	
 	ddf_fun_t *fnode = NULL;
-	int rc;
+	errno_t rc;
 	
 	/* Create new device. */
@@ -238,5 +238,5 @@
  * @return Zero on success or non-zero error code.
  */
-static int msim_dev_add(ddf_dev_t *dev)
+static errno_t msim_dev_add(ddf_dev_t *dev)
 {
 	ddf_msg(LVL_DEBUG, "msim_dev_add, device handle = %d",
Index: uspace/drv/platform/pc/pc.c
===================================================================
--- uspace/drv/platform/pc/pc.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/pc/pc.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -59,5 +59,5 @@
 } pc_fun_t;
 
-static int pc_dev_add(ddf_dev_t *dev);
+static errno_t pc_dev_add(ddf_dev_t *dev);
 static void pc_init(void);
 
@@ -125,5 +125,5 @@
 }
 
-static int pc_enable_interrupt(ddf_fun_t *fun, int irq)
+static errno_t pc_enable_interrupt(ddf_fun_t *fun, int irq)
 {
 	/* TODO */
@@ -159,5 +159,5 @@
 	
 	ddf_fun_t *fnode = NULL;
-	int rc;
+	errno_t rc;
 	
 	/* Create new device. */
@@ -205,5 +205,5 @@
  * @return		Zero on success, error number otherwise.
  */
-static int pc_dev_add(ddf_dev_t *dev)
+static errno_t pc_dev_add(ddf_dev_t *dev)
 {
 	ddf_msg(LVL_DEBUG, "pc_dev_add, device handle = %d",
Index: uspace/drv/platform/ski/ski.c
===================================================================
--- uspace/drv/platform/ski/ski.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/ski/ski.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -46,5 +46,5 @@
 #define NAME "ski"
 
-static int ski_dev_add(ddf_dev_t *dev);
+static errno_t ski_dev_add(ddf_dev_t *dev);
 
 static driver_ops_t ski_ops = {
@@ -57,10 +57,10 @@
 };
 
-static int ski_add_fun(ddf_dev_t *dev, const char *name, const char *str_match_id)
+static errno_t ski_add_fun(ddf_dev_t *dev, const char *name, const char *str_match_id)
 {
 	ddf_msg(LVL_NOTE, "Adding function '%s'.", name);
 
 	ddf_fun_t *fnode = NULL;
-	int rc;
+	errno_t rc;
 
 	/* Create new device. */
@@ -94,7 +94,7 @@
 }
 
-static int ski_add_functions(ddf_dev_t *dev)
+static errno_t ski_add_functions(ddf_dev_t *dev)
 {
-	int rc;
+	errno_t rc;
 
 	rc = ski_add_fun(dev, "console", "ski/console");
@@ -106,5 +106,5 @@
 
 /** Add device. */
-static int ski_dev_add(ddf_dev_t *dev)
+static errno_t ski_dev_add(ddf_dev_t *dev)
 {
 	ddf_msg(LVL_NOTE, "ski_dev_add, device handle = %d",
@@ -121,5 +121,5 @@
 int main(int argc, char *argv[])
 {
-	int rc;
+	errno_t rc;
 
 	printf(NAME ": Ski platform driver\n");
Index: uspace/drv/platform/sun4u/sun4u.c
===================================================================
--- uspace/drv/platform/sun4u/sun4u.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/sun4u/sun4u.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -77,5 +77,5 @@
 } sun4u_fun_t;
 
-static int sun4u_dev_add(ddf_dev_t *dev);
+static errno_t sun4u_dev_add(ddf_dev_t *dev);
 static void sun4u_init(void);
 
@@ -159,5 +159,5 @@
 }
 
-static int sun4u_enable_interrupt(ddf_fun_t *fun, int irq)
+static errno_t sun4u_enable_interrupt(ddf_fun_t *fun, int irq)
 {
 	/* TODO */
@@ -193,5 +193,5 @@
 	
 	ddf_fun_t *fnode = NULL;
-	int rc;
+	errno_t rc;
 	
 	/* Create new device. */
@@ -242,5 +242,5 @@
  * @return		Zero on success, error number otherwise.
  */
-static int sun4u_dev_add(ddf_dev_t *dev)
+static errno_t sun4u_dev_add(ddf_dev_t *dev)
 {
 	ddf_msg(LVL_DEBUG, "sun4u_dev_add, device handle = %d",
Index: uspace/drv/platform/sun4v/sun4v.c
===================================================================
--- uspace/drv/platform/sun4v/sun4v.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/platform/sun4v/sun4v.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -55,5 +55,5 @@
 } sun4v_fun_t;
 
-static int sun4v_dev_add(ddf_dev_t *dev);
+static errno_t sun4v_dev_add(ddf_dev_t *dev);
 
 static driver_ops_t sun4v_ops = {
@@ -114,5 +114,5 @@
 }
 
-static int sun4v_enable_interrupt(ddf_fun_t *fun, int irq)
+static errno_t sun4v_enable_interrupt(ddf_fun_t *fun, int irq)
 {
 	return EOK;
@@ -138,5 +138,5 @@
 static ddf_dev_ops_t sun4v_fun_ops;
 
-static int sun4v_add_fun(ddf_dev_t *dev, const char *name,
+static errno_t sun4v_add_fun(ddf_dev_t *dev, const char *name,
     const char *str_match_id, sun4v_fun_t *fun_proto)
 {
@@ -144,5 +144,5 @@
 
 	ddf_fun_t *fnode = NULL;
-	int rc;
+	errno_t rc;
 
 	/* Create new device. */
@@ -188,7 +188,7 @@
 }
 
-static int sun4v_add_functions(ddf_dev_t *dev)
-{
-	int rc;
+static errno_t sun4v_add_functions(ddf_dev_t *dev)
+{
+	errno_t rc;
 
 	rc = sun4v_add_fun(dev, "console", "sun4v/console", &console_data);
@@ -200,5 +200,5 @@
 
 /** Add device. */
-static int sun4v_dev_add(ddf_dev_t *dev)
+static errno_t sun4v_dev_add(ddf_dev_t *dev)
 {
 	ddf_msg(LVL_DEBUG, "sun4v_dev_add, device handle = %d",
@@ -213,7 +213,7 @@
 }
 
-static int sun4v_init(void)
-{
-	int rc;
+static errno_t sun4v_init(void)
+{
+	errno_t rc;
 	sysarg_t paddr;
 
@@ -247,5 +247,5 @@
 int main(int argc, char *argv[])
 {
-	int rc;
+	errno_t rc;
 
 	printf(NAME ": Sun4v platform driver\n");
