Index: uspace/drv/uhci-hcd/Makefile
===================================================================
--- uspace/drv/uhci-hcd/Makefile	(revision 1e7015755f65dfcb9f747089dadc580b8ddd0952)
+++ uspace/drv/uhci-hcd/Makefile	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
@@ -37,5 +37,4 @@
 	transfer_list.c \
 	uhci.c \
-	endpoint.c \
 	hc.c \
 	root_hub.c \
Index: uspace/drv/uhci-hcd/batch.h
===================================================================
--- uspace/drv/uhci-hcd/batch.h	(revision 1e7015755f65dfcb9f747089dadc580b8ddd0952)
+++ uspace/drv/uhci-hcd/batch.h	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
@@ -35,9 +35,8 @@
 #define DRV_UHCI_BATCH_H
 
-#include <adt/list.h>
-
 #include <usbhc_iface.h>
 #include <usb/usb.h>
 #include <usb/host/device_keeper.h>
+#include <usb/host/endpoint.h>
 #include <usb/host/batch.h>
 
Index: pace/drv/uhci-hcd/endpoint.c
===================================================================
--- uspace/drv/uhci-hcd/endpoint.c	(revision 1e7015755f65dfcb9f747089dadc580b8ddd0952)
+++ 	(revision )
@@ -1,74 +1,0 @@
-/*
- * Copyright (c) 2011 Jan Vesely
- * 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 drvusbuhcihc
- * @{
- */
-/** @file
- * @brief UHCI host controller driver structure
- */
-
-#include <errno.h>
-
-#include "endpoint.h"
-#include "utils/malloc32.h"
-
-int endpoint_init(endpoint_t *instance, usb_transfer_type_t transfer_type,
-    usb_speed_t speed, size_t max_packet_size)
-{
-	assert(instance);
-	link_initialize(&instance->same_device_eps);
-	instance->transfer_type = transfer_type;
-	instance->speed = speed;
-	instance->max_packet_size = max_packet_size;
-	instance->toggle = 0;
-	instance->qh = malloc32(sizeof(qh_t));
-	if (instance->qh == NULL)
-		return ENOMEM;
-	return EOK;
-}
-/*----------------------------------------------------------------------------*/
-void endpoint_destroy(void *ep)
-{
-	endpoint_t *instance = ep;
-	assert(instance);
-	list_remove(&instance->same_device_eps);
-	free32(instance->qh);
-	free(instance);
-}
-/*----------------------------------------------------------------------------*/
-void endpoint_toggle_reset(link_t *ep)
-{
-	endpoint_t *instance =
-	    list_get_instance(ep, endpoint_t, same_device_eps);
-	assert(instance);
-	instance->toggle = 0;
-}
-/**
- * @}
- */
Index: pace/drv/uhci-hcd/endpoint.h
===================================================================
--- uspace/drv/uhci-hcd/endpoint.h	(revision 1e7015755f65dfcb9f747089dadc580b8ddd0952)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/*
- * Copyright (c) 2011 Jan Vesely
- * 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 drvusbuhcihc
- * @{
- */
-/** @file
- * @brief UHCI host controller driver structure
- */
-#ifndef DRV_UHCI_UHCI_ENDPOINT_H
-#define DRV_UHCI_UHCI_ENDPOINT_H
-
-#include <assert.h>
-#include <bool.h>
-#include <adt/list.h>
-#include <usb/usb.h>
-
-#include "hw_struct/queue_head.h"
-
-typedef struct endpoint {
-	link_t same_device_eps;
-	usb_transfer_type_t transfer_type;
-	usb_speed_t speed;
-	size_t max_packet_size;
-	bool active;
-	int toggle:1;
-	qh_t *qh;
-} endpoint_t;
-
-int endpoint_init(endpoint_t *instance, usb_transfer_type_t transfer_type,
-    usb_speed_t speed, size_t max_packet_size);
-
-void endpoint_destroy(void *ep);
-
-void endpoint_toggle_reset(link_t *ep);
-
-#endif
-/**
- * @}
- */
Index: uspace/drv/uhci-hcd/iface.c
===================================================================
--- uspace/drv/uhci-hcd/iface.c	(revision 1e7015755f65dfcb9f747089dadc580b8ddd0952)
+++ uspace/drv/uhci-hcd/iface.c	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
@@ -36,6 +36,6 @@
 
 #include <usb/debug.h>
-
-#include "endpoint.h"
+#include <usb/host/endpoint.h>
+
 #include "iface.h"
 #include "hc.h"
@@ -159,5 +159,8 @@
 	const usb_speed_t speed =
 	    usb_device_keeper_get_speed(&hc->manager, address);
-	const size_t size = max_packet_size;
+	const size_t size =
+	    (transfer_type == USB_TRANSFER_INTERRUPT
+	    || transfer_type == USB_TRANSFER_ISOCHRONOUS) ?
+	    max_packet_size : 0;
 	int ret;
 
@@ -175,12 +178,6 @@
 	    usb_str_speed(speed), direction, size, max_packet_size, interval);
 
-	const size_t bw =
-	    (transfer_type == USB_TRANSFER_INTERRUPT
-	    || transfer_type == USB_TRANSFER_ISOCHRONOUS) ?
-	    bandwidth_count_usb11(speed, transfer_type, size, max_packet_size) :
-	    0;
-
 	ret = usb_endpoint_manager_register_ep(&hc->ep_manager,
-	    address, endpoint, direction, ep, endpoint_destroy, bw);
+	    address, endpoint, direction, ep, size);
 	if (ret != EOK) {
 		endpoint_destroy(ep);
@@ -226,5 +223,5 @@
 
 	size_t res_bw;
-	endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
+	endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
 	    target.address, target.endpoint, USB_DIRECTION_OUT, &res_bw);
 	if (ep == NULL) {
@@ -283,5 +280,5 @@
 
 	size_t res_bw;
-	endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
+	endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
 	    target.address, target.endpoint, USB_DIRECTION_IN, &res_bw);
 	if (ep == NULL) {
@@ -340,5 +337,5 @@
 	    target.address, target.endpoint, size, max_packet_size);
 
-	endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
+	endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
 	    target.address, target.endpoint, USB_DIRECTION_OUT, NULL);
 	if (ep == NULL) {
@@ -387,5 +384,5 @@
 	    target.address, target.endpoint, size, max_packet_size);
 
-	endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
+	endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
 	    target.address, target.endpoint, USB_DIRECTION_IN, NULL);
 	if (ep == NULL) {
@@ -438,5 +435,5 @@
 	usb_log_debug("Control WRITE (%d) %d:%d %zu(%zu).\n",
 	    speed, target.address, target.endpoint, size, max_packet_size);
-	endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
+	endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
 	    target.address, target.endpoint, USB_DIRECTION_BOTH, NULL);
 	if (ep == NULL) {
@@ -489,5 +486,5 @@
 	usb_log_debug("Control READ(%d) %d:%d %zu(%zu).\n",
 	    speed, target.address, target.endpoint, size, max_packet_size);
-	endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
+	endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
 	    target.address, target.endpoint, USB_DIRECTION_BOTH, NULL);
 	if (ep == NULL) {
Index: uspace/lib/usb/Makefile
===================================================================
--- uspace/lib/usb/Makefile	(revision 1e7015755f65dfcb9f747089dadc580b8ddd0952)
+++ uspace/lib/usb/Makefile	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
@@ -54,4 +54,5 @@
 	src/host/device_keeper.c \
 	src/host/batch.c \
+	src/host/endpoint.c \
 	src/host/usb_endpoint_manager.c
 
Index: uspace/lib/usb/include/usb/host/endpoint.h
===================================================================
--- uspace/lib/usb/include/usb/host/endpoint.h	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
+++ uspace/lib/usb/include/usb/host/endpoint.h	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2011 Jan Vesely
+ * 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 libusb
+ * @{
+ */
+/** @file
+ *
+ */
+#ifndef LIBUSB_HOST_ENDPOINT_H
+#define LIBUSB_HOST_ENDPOINT_H
+
+#include <assert.h>
+#include <bool.h>
+#include <adt/list.h>
+#include <usb/usb.h>
+
+typedef struct endpoint {
+	link_t same_device_eps;
+	usb_transfer_type_t transfer_type;
+	usb_speed_t speed;
+	size_t max_packet_size;
+	bool active;
+	int toggle:1;
+} endpoint_t;
+
+int endpoint_init(endpoint_t *instance, usb_transfer_type_t transfer_type,
+    usb_speed_t speed, size_t max_packet_size);
+
+void endpoint_destroy(endpoint_t *instance);
+
+void endpoint_toggle_reset(link_t *ep);
+
+#endif
+/**
+ * @}
+ */
Index: uspace/lib/usb/include/usb/host/usb_endpoint_manager.h
===================================================================
--- uspace/lib/usb/include/usb/host/usb_endpoint_manager.h	(revision 1e7015755f65dfcb9f747089dadc580b8ddd0952)
+++ uspace/lib/usb/include/usb/host/usb_endpoint_manager.h	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
@@ -43,4 +43,5 @@
 #include <fibril_synch.h>
 #include <usb/usb.h>
+#include <usb/host/endpoint.h>
 
 #define BANDWIDTH_TOTAL_USB11 12000000
@@ -63,6 +64,6 @@
 
 int usb_endpoint_manager_register_ep(usb_endpoint_manager_t *instance,
-    usb_address_t address, usb_endpoint_t ep, usb_direction_t direction,
-    void *data, void (*data_remove_callback)(void* data), size_t bw);
+    usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction,
+    endpoint_t *ep, size_t data_size);
 
 int usb_endpoint_manager_register_ep_wait(usb_endpoint_manager_t *instance,
@@ -74,5 +75,5 @@
     usb_address_t address, usb_endpoint_t ep, usb_direction_t direction);
 
-void * usb_endpoint_manager_get_ep_data(usb_endpoint_manager_t *instance,
+endpoint_t * usb_endpoint_manager_get_ep(usb_endpoint_manager_t *instance,
     usb_address_t address, usb_endpoint_t ep, usb_direction_t direction,
     size_t *bw);
Index: uspace/lib/usb/src/host/device_keeper.c
===================================================================
--- uspace/lib/usb/src/host/device_keeper.c	(revision 1e7015755f65dfcb9f747089dadc580b8ddd0952)
+++ uspace/lib/usb/src/host/device_keeper.c	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
@@ -63,5 +63,12 @@
 /*----------------------------------------------------------------------------*/
 void usb_device_keeper_add_ep(
-    usb_device_keeper_t *instance, usb_address_t address, link_t *ep);
+    usb_device_keeper_t *instance, usb_address_t address, link_t *ep)
+{
+	assert(instance);
+	fibril_mutex_lock(&instance->guard);
+	assert(instance->devices[address].occupied);
+	list_append(ep, &instance->devices[address].endpoints);
+	fibril_mutex_unlock(&instance->guard);
+}
 /*----------------------------------------------------------------------------*/
 /** Attempt to obtain address 0, blocks.
Index: uspace/lib/usb/src/host/endpoint.c
===================================================================
--- uspace/lib/usb/src/host/endpoint.c	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
+++ uspace/lib/usb/src/host/endpoint.c	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2011 Jan Vesely
+ * 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 drvusbuhcihc
+ * @{
+ */
+/** @file
+ * @brief UHCI host controller driver structure
+ */
+
+#include <errno.h>
+
+#include <usb/host/endpoint.h>
+
+int endpoint_init(endpoint_t *instance, usb_transfer_type_t transfer_type,
+    usb_speed_t speed, size_t max_packet_size)
+{
+	assert(instance);
+	link_initialize(&instance->same_device_eps);
+	instance->transfer_type = transfer_type;
+	instance->speed = speed;
+	instance->max_packet_size = max_packet_size;
+	instance->toggle = 0;
+	return EOK;
+}
+/*----------------------------------------------------------------------------*/
+void endpoint_destroy(endpoint_t *instance)
+{
+	assert(instance);
+	list_remove(&instance->same_device_eps);
+	free(instance);
+}
+/*----------------------------------------------------------------------------*/
+void endpoint_toggle_reset(link_t *ep)
+{
+	endpoint_t *instance =
+	    list_get_instance(ep, endpoint_t, same_device_eps);
+	assert(instance);
+	instance->toggle = 0;
+}
+/**
+ * @}
+ */
Index: uspace/lib/usb/src/host/usb_endpoint_manager.c
===================================================================
--- uspace/lib/usb/src/host/usb_endpoint_manager.c	(revision 1e7015755f65dfcb9f747089dadc580b8ddd0952)
+++ uspace/lib/usb/src/host/usb_endpoint_manager.c	(revision 8dc762e047944f4eeb1b533176031bd8bfe58813)
@@ -48,9 +48,8 @@
 	link_t link;
 	size_t bw;
-	void *data;
-	void (*data_remove_callback)(void* data);
-} ep_t;
-/*----------------------------------------------------------------------------*/
-static hash_index_t ep_hash(unsigned long key[])
+	endpoint_t *ep;
+} node_t;
+/*----------------------------------------------------------------------------*/
+static hash_index_t node_hash(unsigned long key[])
 {
 	hash_index_t hash = 0;
@@ -63,11 +62,11 @@
 }
 /*----------------------------------------------------------------------------*/
-static int ep_compare(unsigned long key[], hash_count_t keys, link_t *item)
+static int node_compare(unsigned long key[], hash_count_t keys, link_t *item)
 {
 	assert(item);
-	ep_t *ep = hash_table_get_instance(item, ep_t, link);
+	node_t *node = hash_table_get_instance(item, node_t, link);
 	hash_count_t i = 0;
 	for (; i < keys; ++i) {
-		if (key[i] != ep->key[i])
+		if (key[i] != node->key[i])
 			return false;
 	}
@@ -75,17 +74,16 @@
 }
 /*----------------------------------------------------------------------------*/
-static void ep_remove(link_t *item)
+static void node_remove(link_t *item)
 {
 	assert(item);
-	ep_t *ep =
-	    hash_table_get_instance(item, ep_t, link);
-	ep->data_remove_callback(ep->data);
-	free(ep);
+	node_t *node = hash_table_get_instance(item, node_t, link);
+	endpoint_destroy(node->ep);
+	free(node);
 }
 /*----------------------------------------------------------------------------*/
 static hash_table_operations_t op = {
-	.hash = ep_hash,
-	.compare = ep_compare,
-	.remove_callback = ep_remove,
+	.hash = node_hash,
+	.compare = node_compare,
+	.remove_callback = node_remove,
 };
 /*----------------------------------------------------------------------------*/
@@ -145,6 +143,9 @@
 int usb_endpoint_manager_register_ep(usb_endpoint_manager_t *instance,
     usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction,
-    void *data, void (*data_remove_callback)(void* data), size_t bw)
-{
+    endpoint_t *ep, size_t data_size)
+{
+	assert(ep);
+	size_t bw = bandwidth_count_usb11(ep->speed, ep->transfer_type,
+	    data_size, ep->max_packet_size);
 	assert(instance);
 
@@ -168,16 +169,17 @@
 	}
 
-	ep_t *ep = malloc(sizeof(ep_t));
-	if (ep == NULL) {
+	node_t *node = malloc(sizeof(node_t));
+	if (node == NULL) {
 		fibril_mutex_unlock(&instance->guard);
 		return ENOMEM;
 	}
 
-	ep->id = id;
-	ep->bw = bw;
-	ep->data = data;
-	link_initialize(&ep->link);
-
-	hash_table_insert(&instance->ep_table, (unsigned long*)&id, &ep->link);
+	node->id = id;
+	node->bw = bw;
+	node->ep = ep;
+	link_initialize(&node->link);
+
+	hash_table_insert(&instance->ep_table,
+	    (unsigned long*)&id, &node->link);
 	instance->free_bw -= bw;
 	fibril_mutex_unlock(&instance->guard);
@@ -203,6 +205,6 @@
 	}
 
-	ep_t *ep = hash_table_get_instance(item, ep_t, link);
-	instance->free_bw += ep->bw;
+	node_t *node = hash_table_get_instance(item, node_t, link);
+	instance->free_bw += node->bw;
 	hash_table_remove(&instance->ep_table, (unsigned long*)&id, MAX_KEYS);
 
@@ -212,5 +214,5 @@
 }
 /*----------------------------------------------------------------------------*/
-void * usb_endpoint_manager_get_ep_data(usb_endpoint_manager_t *instance,
+endpoint_t * usb_endpoint_manager_get_ep(usb_endpoint_manager_t *instance,
     usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction,
     size_t *bw)
@@ -229,9 +231,9 @@
 		return NULL;
 	}
-	ep_t *ep = hash_table_get_instance(item, ep_t, link);
+	node_t *node = hash_table_get_instance(item, node_t, link);
 	if (bw)
-		*bw = ep->bw;
+		*bw = node->bw;
 
 	fibril_mutex_unlock(&instance->guard);
-	return ep->data;
-}
+	return node->ep;
+}
