Index: uspace/lib/libc/generic/device/hw_res.c
===================================================================
--- uspace/lib/libc/generic/device/hw_res.c	(revision 3a5909fe4bb88de08b53e63b8b853f35876cd30c)
+++ uspace/lib/libc/generic/device/hw_res.c	(revision 3843ecb7d7c7992f743d7917e8f23cddd7c7b5c9)
@@ -37,10 +37,9 @@
 #include <async.h>
 #include <malloc.h>
- 
 
 bool get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources)
 {
 	ipcarg_t count = 0;
-	int rc = async_req_1_1(dev_phone, HW_RES_DEV_IFACE, GET_RESOURCE_LIST, &count);
+	int rc = async_req_1_1(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), GET_RESOURCE_LIST, &count);
 	hw_resources->count = count;
 	if (EOK != rc) {
@@ -66,5 +65,5 @@
 bool enable_interrupt(int dev_phone)
 {
-	int rc = async_req_1_0(dev_phone, HW_RES_DEV_IFACE, ENABLE_INTERRUPT);
+	int rc = async_req_1_0(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), ENABLE_INTERRUPT);
 	return rc == EOK;
 }
Index: uspace/lib/libc/include/device/hw_res.h
===================================================================
--- uspace/lib/libc/include/device/hw_res.h	(revision 3a5909fe4bb88de08b53e63b8b853f35876cd30c)
+++ uspace/lib/libc/include/device/hw_res.h	(revision 3843ecb7d7c7992f743d7917e8f23cddd7c7b5c9)
@@ -39,4 +39,38 @@
 #include <bool.h>
 
+/** HW resource (e.g. interrupt, memory register, i/o register etc.). */
+typedef struct hw_resource {
+	hw_res_type_t type;
+	union {
+		struct {
+			uint64_t address;
+			endianness_t endianness;			
+			size_t size;			
+		} mem_range;
+		struct {
+			uint64_t address;
+			endianness_t endianness;			
+			size_t size;			
+		} io_range;
+		struct {
+			int irq;			
+		} interrupt;		
+	} res;	
+} hw_resource_t;
+
+typedef struct hw_resource_list {
+	size_t count;
+	hw_resource_t *resources;	
+} hw_resource_list_t;
+
+static inline void clean_hw_resource_list(hw_resource_list_t *hw_res)
+{
+	if(NULL != hw_res->resources) {
+		free(hw_res->resources);
+		hw_res->resources = NULL;
+	}
+	hw_res->count = 0;	
+}
+
 
 bool get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources);
Index: uspace/lib/libc/include/ipc/dev_iface.h
===================================================================
--- uspace/lib/libc/include/ipc/dev_iface.h	(revision 3a5909fe4bb88de08b53e63b8b853f35876cd30c)
+++ uspace/lib/libc/include/ipc/dev_iface.h	(revision 3843ecb7d7c7992f743d7917e8f23cddd7c7b5c9)
@@ -35,17 +35,15 @@
 #include <libarch/types.h>
 
-#define DEV_IFACE_FIRST IPC_FIRST_USER_METHOD
-
 typedef enum {	
-	HW_RES_DEV_IFACE = DEV_IFACE_FIRST,	
+	HW_RES_DEV_IFACE = 0,	
 	// TODO add more interfaces
 	DEV_IFACE_MAX
-} dev_inferface_id_t;
+} dev_inferface_idx_t;
 
+#define DEV_IFACE_ID(idx) ((idx) + IPC_FIRST_USER_METHOD)
+#define DEV_IFACE_IDX(id) ((id) - IPC_FIRST_USER_METHOD)
 
-#define DEV_IFACE_COUNT (DEV_IFACE_MAX - DEV_IFACE_FIRST)
+#define DEV_IFACE_COUNT DEV_IFACE_MAX
 
-
-// data types related to some interface - TODO move this to separate header files
 
 
@@ -69,37 +67,3 @@
 } endianness_t;
 
-/** HW resource (e.g. interrupt, memory register, i/o register etc.). */
-typedef struct hw_resource {
-	hw_res_type_t type;
-	union {
-		struct {
-			uint64_t address;
-			endianness_t endianness;			
-			size_t size;			
-		} mem_range;
-		struct {
-			uint64_t address;
-			endianness_t endianness;			
-			size_t size;			
-		} io_range;
-		struct {
-			int irq;			
-		} interrupt;		
-	} res;	
-} hw_resource_t;
-
-typedef struct hw_resource_list {
-	size_t count;
-	hw_resource_t *resources;	
-} hw_resource_list_t;
-
-static inline void clean_hw_resource_list(hw_resource_list_t *hw_res)
-{
-	if(NULL != hw_res->resources) {
-		free(hw_res->resources);
-		hw_res->resources = NULL;
-	}
-	hw_res->count = 0;	
-}
-
 #endif
