Index: uspace/lib/usb/src/dev.c
===================================================================
--- uspace/lib/usb/src/dev.c	(revision b0fc92c51f81f569086cf49f631e3011959cbd53)
+++ uspace/lib/usb/src/dev.c	(revision 026271d5b6f0c2f02cd1ddb46545d5290a89565e)
@@ -29,5 +29,4 @@
 
 #include <usb/dev.h>
-#include <usb/hc.h>
 #include <errno.h>
 #include <usb_iface.h>
Index: uspace/lib/usb/src/hc.c
===================================================================
--- uspace/lib/usb/src/hc.c	(revision b0fc92c51f81f569086cf49f631e3011959cbd53)
+++ 	(revision )
@@ -1,174 +1,0 @@
-/*
- * Copyright (c) 2011 Vojtech Horky
- * 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
- * General communication with host controller driver (implementation).
- */
-
-#include <usb/debug.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <usbhc_iface.h>
-#include <usb/dev.h>
-#include <usb/hc.h>
-
-static int usb_hc_connection_add_ref(usb_hc_connection_t *connection)
-{
-	assert(connection);
-	
-	fibril_mutex_lock(&connection->guard);
-	if (connection->ref_count == 0) {
-		assert(connection->hc_sess == NULL);
-		/* Parallel exchange for us */
-		connection->hc_sess = devman_device_connect(EXCHANGE_PARALLEL,
-		        connection->hc_handle, 0);
-		if (!connection->hc_sess) {
-			fibril_mutex_unlock(&connection->guard);
-			return ENOMEM;
-		}
-	}
-	
-	++connection->ref_count;
-	fibril_mutex_unlock(&connection->guard);
-	return EOK;
-}
-
-static int usb_hc_connection_del_ref(usb_hc_connection_t *connection)
-{
-	assert(connection);
-	
-	fibril_mutex_lock(&connection->guard);
-	if (connection->ref_count == 0) {
-		/* Closing already closed connection... */
-		assert(connection->hc_sess == NULL);
-		fibril_mutex_unlock(&connection->guard);
-		return EOK;
-	}
-	
-	--connection->ref_count;
-	int ret = EOK;
-	if (connection->ref_count == 0) {
-		assert(connection->hc_sess);
-		ret = async_hangup(connection->hc_sess);
-		connection->hc_sess = NULL;
-	}
-	fibril_mutex_unlock(&connection->guard);
-	return ret;
-}
-
-#define EXCH_INIT(connection, exch) \
-do { \
-	exch = NULL; \
-	if (!connection) \
-		return EBADMEM; \
-	const int ret = usb_hc_connection_add_ref(connection); \
-	if (ret != EOK) \
-		return ret; \
-	exch = async_exchange_begin(connection->hc_sess); \
-	if (exch == NULL) { \
-		usb_hc_connection_del_ref(connection); \
-		return ENOMEM; \
-	} \
-} while (0)
-
-#define EXCH_FINI(connection, exch) \
-if (exch) { \
-	async_exchange_end(exch); \
-	usb_hc_connection_del_ref(connection); \
-} else (void)0
-
-
-void usb_hc_connection_deinitialize(usb_hc_connection_t *connection)
-{
-	assert(connection);
-	fibril_mutex_lock(&connection->guard);
-	if (connection->ref_count != 0) {
-		usb_log_warning("%u stale reference(s) to HC connection.\n",
-		    connection->ref_count);
-		assert(connection->hc_sess);
-		async_hangup(connection->hc_sess);
-		connection->hc_sess = NULL;
-		connection->ref_count = 0;
-	}
-	fibril_mutex_unlock(&connection->guard);
-}
-
-/** Open connection to host controller.
- *
- * @param connection Connection to the host controller.
- * @return Error code.
- */
-int usb_hc_connection_open(usb_hc_connection_t *connection)
-{
-	return usb_hc_connection_add_ref(connection);
-}
-
-/** Close connection to the host controller.
- *
- * @param connection Connection to the host controller.
- * @return Error code.
- */
-int usb_hc_connection_close(usb_hc_connection_t *connection)
-{
-	return usb_hc_connection_del_ref(connection);
-}
-
-int usb_hc_read(usb_hc_connection_t *connection, usb_address_t address,
-    usb_endpoint_t endpoint, uint64_t setup, void *data, size_t size,
-    size_t *real_size)
-{
-	async_exch_t *exch;
-	EXCH_INIT(connection, exch);
-
-	const int ret =
-	    usbhc_read(exch, address, endpoint, setup, data, size, real_size);
-
-	EXCH_FINI(connection, exch);
-	return ret;
-}
-
-int usb_hc_write(usb_hc_connection_t *connection, usb_address_t address,
-    usb_endpoint_t endpoint, uint64_t setup, const void *data, size_t size)
-{
-	async_exch_t *exch;
-	EXCH_INIT(connection, exch);
-
-	const int ret = usbhc_write(exch, address, endpoint, setup, data, size);
-
-	EXCH_FINI(connection, exch);
-	return ret;
-}
-
-/**
- * @}
- */
