Index: uspace/drv/bus/usb/xhci/bus.c
===================================================================
--- uspace/drv/bus/usb/xhci/bus.c	(revision 31cca4f32e9a51af49d12c4a23a2adfb951e750c)
+++ uspace/drv/bus/usb/xhci/bus.c	(revision 327f14759b992c17c88f75a6ddd0e2aa077e1957)
@@ -33,6 +33,4 @@
  */
 
-#include <adt/hash_table.h>
-#include <adt/hash.h>
 #include <usb/host/utils/malloc32.h>
 #include <usb/host/ddf_helpers.h>
@@ -50,16 +48,4 @@
 #include "endpoint.h"
 #include "transfers.h"
-
-/** Element of the hash table. */
-typedef struct {
-	ht_link_t link;
-
-	/** Device */
-	xhci_device_t *device;
-} hashed_device_t;
-
-static int hashed_device_insert(xhci_bus_t *bus, hashed_device_t **hashed_dev, xhci_device_t *dev);
-static int hashed_device_remove(xhci_bus_t *bus, hashed_device_t *hashed_dev);
-static int hashed_device_find_by_address(xhci_bus_t *bus, usb_address_t address, hashed_device_t **dev);
 
 /** TODO: Still some copy-pasta left...
@@ -94,19 +80,12 @@
 	bus->devices_by_slot[xhci_dev->slot_id] = xhci_dev;
 
-	hashed_device_t *hashed_dev = NULL;
-	if ((err = hashed_device_insert(bus, &hashed_dev, xhci_dev)))
-		goto err_address;
-
 	/* Read the device descriptor, derive the match ids */
 	if ((err = hcd_ddf_device_explore(hc->hcd, dev))) {
 		usb_log_error("Device(%d): Failed to explore device: %s", dev->address, str_error(err));
-		goto err_hash;
-	}
-
-	return EOK;
-
-err_hash:
-	bus->devices_by_slot[xhci_dev->slot_id] = NULL;
-	hashed_device_remove(bus, hashed_dev);
+		goto err_address;
+	}
+
+	return EOK;
+
 err_address:
 	bus_release_address(&bus->base, dev->address);
@@ -127,13 +106,4 @@
 	}
 
-	hashed_device_t *hashed_dev;
-	int res = hashed_device_find_by_address(bus, dev->address, &hashed_dev);
-	if (res)
-		return res;
-
-	res = hashed_device_remove(bus, hashed_dev);
-	if (res != EOK)
-		return res;
-
 	// XXX: Ugly here. Move to device_destroy at endpoint.c?
 	free32(xhci_dev->dev_ctx);
@@ -193,54 +163,4 @@
 	xhci_endpoint_fini(xhci_ep);
 	free(xhci_ep);
-}
-
-static int hashed_device_find_by_address(xhci_bus_t *bus, usb_address_t address, hashed_device_t **dev)
-{
-	ht_link_t *link = hash_table_find(&bus->devices, &address);
-	if (link == NULL)
-		return ENOENT;
-
-	*dev = hash_table_get_inst(link, hashed_device_t, link);
-	return EOK;
-}
-
-static int xhci_endpoint_find_by_target(xhci_bus_t *bus, usb_target_t target, xhci_endpoint_t **ep)
-{
-	hashed_device_t *dev;
-	int res = hashed_device_find_by_address(bus, target.address, &dev);
-	if (res != EOK)
-		return res;
-
-	xhci_endpoint_t *ret_ep = xhci_device_get_endpoint(dev->device, target.endpoint);
-	if (!ret_ep)
-		return ENOENT;
-
-	*ep = ret_ep;
-	return EOK;
-}
-
-static int hashed_device_insert(xhci_bus_t *bus, hashed_device_t **hashed_dev, xhci_device_t *dev)
-{
-	hashed_device_t *ret_dev = (hashed_device_t *) calloc(1, sizeof(hashed_device_t));
-	if (!ret_dev)
-		return ENOMEM;
-
-	ret_dev->device = dev;
-
-	usb_log_info("Device(%d) registered to XHCI bus.", dev->base.address);
-
-	hash_table_insert(&bus->devices, &ret_dev->link);
-	*hashed_dev = ret_dev;
-	return EOK;
-}
-
-static int hashed_device_remove(xhci_bus_t *bus, hashed_device_t *hashed_dev)
-{
-	usb_log_info("Device(%d) released from XHCI bus.", hashed_dev->device->base.address);
-
-	hash_table_remove(&bus->devices, &hashed_dev->device->base.address);
-	free(hashed_dev);
-
-	return EOK;
 }
 
@@ -273,12 +193,10 @@
 }
 
-static endpoint_t* find_endpoint(bus_t *bus_base, usb_target_t target, usb_direction_t direction)
-{
-	xhci_bus_t *bus = bus_to_xhci_bus(bus_base);
-	assert(bus);
-
-	xhci_endpoint_t *ep;
-	int res = xhci_endpoint_find_by_target(bus, target, &ep);
-	if (res != EOK)
+static endpoint_t* find_endpoint(bus_t *bus_base, device_t *dev_base, usb_target_t target, usb_direction_t direction)
+{
+	xhci_device_t *dev = xhci_device_get(dev_base);
+
+	xhci_endpoint_t *ep = xhci_device_get_endpoint(dev, target.endpoint);
+	if (!ep)
 		return NULL;
 
@@ -345,30 +263,4 @@
 };
 
-static size_t device_ht_hash(const ht_link_t *item)
-{
-	hashed_device_t *dev = hash_table_get_inst(item, hashed_device_t, link);
-	return (size_t) hash_mix(dev->device->base.address);
-}
-
-static size_t device_ht_key_hash(void *key)
-{
-	return (size_t) hash_mix(*(usb_address_t *)key);
-}
-
-static bool device_ht_key_equal(void *key, const ht_link_t *item)
-{
-	hashed_device_t *dev = hash_table_get_inst(item, hashed_device_t, link);
-	return dev->device->base.address == *(usb_address_t *) key;
-}
-
-/** Operations for the device hash table. */
-static hash_table_ops_t device_ht_ops = {
-	.hash = device_ht_hash,
-	.key_hash = device_ht_key_hash,
-	.key_equal = device_ht_key_equal,
-	.equal = NULL,
-	.remove_callback = NULL
-};
-
 int xhci_bus_init(xhci_bus_t *bus, xhci_hc_t *hc)
 {
@@ -381,9 +273,4 @@
 		return ENOMEM;
 
-	if (!hash_table_create(&bus->devices, 0, 0, &device_ht_ops)) {
-		free(bus->devices_by_slot);
-		return ENOMEM;
-	}
-
 	bus->base.ops = xhci_bus_ops;
 	return EOK;
@@ -392,7 +279,5 @@
 void xhci_bus_fini(xhci_bus_t *bus)
 {
-	// FIXME: Make sure no devices are in the hash table.
-
-	hash_table_destroy(&bus->devices);
+
 }
 
Index: uspace/drv/bus/usb/xhci/bus.h
===================================================================
--- uspace/drv/bus/usb/xhci/bus.h	(revision 31cca4f32e9a51af49d12c4a23a2adfb951e750c)
+++ uspace/drv/bus/usb/xhci/bus.h	(revision 327f14759b992c17c88f75a6ddd0e2aa077e1957)
@@ -38,5 +38,4 @@
 #define XHCI_BUS_H
 
-#include <adt/hash_table.h>
 #include <usb/usb.h>
 #include <usb/host/bus.h>
@@ -50,7 +49,4 @@
 
 	xhci_device_t **devices_by_slot;	/**< Devices by Slot ID */
-
-	/** TODO: Do we really need this? */
-	hash_table_t devices;		/**< Devices by address */
 } xhci_bus_t;
 
