Index: uspace/drv/bus/usb/ohci/root_hub.c
===================================================================
--- uspace/drv/bus/usb/ohci/root_hub.c	(revision bb58dc0bc1615c88a36831642bb7800d33e417c8)
+++ uspace/drv/bus/usb/ohci/root_hub.c	(revision 56c6b88884056edff31548a7472989f21b2ff5bf)
@@ -174,7 +174,4 @@
     rh_t *instance, uint16_t feature, uint16_t port);
 
-static int request_with_input(
-    rh_t *instance, usb_transfer_batch_t *request);
-
 static int request_with_output(
     rh_t *instance, usb_transfer_batch_t *request);
@@ -195,5 +192,5 @@
 	request->transfered_size = bytes; \
 	return EOK; \
-while (0);
+} while (0)
 
 /** Root hub initialization
@@ -391,6 +388,5 @@
 	const uint32_t data = instance->registers->rh_port_status[port - 1];
 	memcpy(request->data_buffer, &data, 4);
-	request->transfered_size = 4;
-	return EOK;
+	TRANSFER_OK(4);
 }
 /*----------------------------------------------------------------------------*/
@@ -415,6 +411,5 @@
 	    (RHS_LPS_FLAG | RHS_LPSC_FLAG | RHS_OCI_FLAG | RHS_OCIC_FLAG);
 	memcpy(request->data_buffer, &data, 4);
-	request->transfered_size = 4;
-	return EOK;
+	TRANSFER_OK(4);
 }
 /*----------------------------------------------------------------------------*/
@@ -550,8 +545,7 @@
 		size = request->buffer_size;
 	}
+
 	memcpy(request->data_buffer, result_descriptor, size);
-	request->transfered_size = size;
-
-	return EOK;
+	TRANSFER_OK(size);
 }
 /*----------------------------------------------------------------------------*/
@@ -565,6 +559,5 @@
  * @return error code
  */
-int port_feature_set_request(
-    rh_t *instance, uint16_t feature, uint16_t port)
+int port_feature_set_request(rh_t *instance, uint16_t feature, uint16_t port)
 {
 	assert(instance);
@@ -610,10 +603,9 @@
 	    & (~port_clear_feature_valid_mask))
 	    | (1 << feature);
-
 	return EOK;
 }
 /*----------------------------------------------------------------------------*/
 /**
- * process one of requests that requere output data
+ * Process a request that requires output data.
  *
  * Request can be one of USB_DEVREQ_GET_STATUS, USB_DEVREQ_GET_DESCRIPTOR or
@@ -643,33 +635,6 @@
 			return EINVAL;
 		request->data_buffer[0] = 1;
-		request->transfered_size = 1;
-		return EOK;
-	}
-	return ENOTSUP;
-}
-/*----------------------------------------------------------------------------*/
-/**
- * process one of requests that carry input data
- *
- * Request can be one of USB_DEVREQ_SET_DESCRIPTOR or
- * USB_DEVREQ_SET_CONFIGURATION.
- * @param instance root hub instance
- * @param request structure containing both request and response information
- * @return error code
- */
-int request_with_input(rh_t *instance, usb_transfer_batch_t *request)
-{
-	assert(instance);
-	assert(request);
-
-	const usb_device_request_setup_packet_t *setup_request =
-	    (usb_device_request_setup_packet_t *) request->setup_buffer;
-	request->transfered_size = 0;
-	if (setup_request->request == USB_DEVREQ_SET_CONFIGURATION) {
-		//set and get configuration requests do not have any meaning,
-		//only dummy values are returned
-		return EOK;
-	}
-	/* USB_DEVREQ_SET_DESCRIPTOR is also not supported */
+		TRANSFER_OK(1);
+	}
 	return ENOTSUP;
 }
@@ -703,10 +668,10 @@
 		if (request_type == USB_HUB_REQ_TYPE_CLEAR_HUB_FEATURE) {
 			usb_log_debug("USB_HUB_REQ_TYPE_CLEAR_HUB_FEATURE\n");
-/*
- * Chapter 11.16.2 specifies that only C_HUB_LOCAL_POWER and
- * C_HUB_OVER_CURRENT are supported. C_HUB_OVER_CURRENT is represented
- * by OHCI RHS_OCIC_FLAG. C_HUB_LOCAL_POWER is not supported
- * as root hubs do not support local power status feature. (OHCI pg. 127)
- */
+	/*
+	 * Chapter 11.16.2 specifies that only C_HUB_LOCAL_POWER and
+	 * C_HUB_OVER_CURRENT are supported. C_HUB_OVER_CURRENT is represented
+	 * by OHCI RHS_OCIC_FLAG. C_HUB_LOCAL_POWER is not supported
+	 * as root hubs do not support local power status feature.
+	 * (OHCI pg. 127) */
 	if (setup_request->value == USB_HUB_FEATURE_C_HUB_OVER_CURRENT) {
 		instance->registers->rh_status = RHS_OCIC_FLAG;
@@ -797,8 +762,9 @@
 		    "additional data\n");
 		return request_without_data(instance, request);
-	case USB_DEVREQ_SET_DESCRIPTOR:
 	case USB_DEVREQ_SET_CONFIGURATION:
 		usb_log_debug2("Processing request with input\n");
-		return request_with_input(instance, request);
+		/* We don't need to do anything */
+		TRANSFER_OK(0);
+	case USB_DEVREQ_SET_DESCRIPTOR: /* Not supported by OHCI RH */
 	default:
 		usb_log_error("Received unsupported request: %d.\n",
