Index: uspace/drv/bus/usb/uhci/uhci_rh.c
===================================================================
--- uspace/drv/bus/usb/uhci/uhci_rh.c	(revision 49f2f29258b1ba2af8b8eca8fa7c9b977272ecce)
+++ uspace/drv/bus/usb/uhci/uhci_rh.c	(revision a5c2eb5fe50ab7a53e906cc1bb8779465d58aea9)
@@ -100,7 +100,6 @@
 	}};
 	batch->error = virthub_base_request(&instance->base, target,
-	    usb_transfer_batch_direction(batch),
-	    (void*)batch->setup_buffer, batch->buffer,
-	    batch->buffer_size, &batch->transfered_size);
+	    usb_transfer_batch_direction(batch), (void*)batch->setup_buffer,
+	    batch->buffer, batch->buffer_size, &batch->transfered_size);
 	usb_transfer_batch_finish(batch, NULL);
 	usb_transfer_batch_destroy(batch);
@@ -375,91 +374,14 @@
 }
 
-/** UHCI root hub request handlers */
-static const usbvirt_control_request_handler_t control_transfer_handlers[] = {
-	{
-		STD_REQ_IN(USB_REQUEST_RECIPIENT_DEVICE, USB_DEVREQ_GET_DESCRIPTOR),
-		.name = "GetDescriptor",
-		.callback = virthub_base_get_hub_descriptor,
-	},
-	{
-		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_DEVICE, USB_DEVREQ_GET_DESCRIPTOR),
-		.name = "GetDescriptor",
-		.callback = virthub_base_get_hub_descriptor,
-	},
-	{
-		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_DEVICE, USB_HUB_REQUEST_GET_DESCRIPTOR),
-		.name = "GetHubDescriptor",
-		.callback = virthub_base_get_hub_descriptor,
-	},
-	{
-		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_OTHER, USB_HUB_REQUEST_GET_STATE),
-		.name = "GetBusState",
-		.callback = req_get_port_state,
-	},
-	{
-		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_OTHER, USB_HUB_REQUEST_GET_STATUS),
-		.name = "GetPortStatus",
-		.callback = req_get_port_status
-	},
-	{
-		CLASS_REQ_OUT(USB_REQUEST_RECIPIENT_DEVICE, USB_HUB_REQUEST_CLEAR_FEATURE),
-		.name = "ClearHubFeature",
-		/* Hub features are overcurrent and supply good,
-		 * this request may only clear changes that we never report*/
-		.callback = req_nop,
-	},
-	{
-		CLASS_REQ_OUT(USB_REQUEST_RECIPIENT_OTHER, USB_HUB_REQUEST_CLEAR_FEATURE),
-		.name = "ClearPortFeature",
-		.callback = req_clear_port_feature
-	},
-	{
-		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_DEVICE, USB_HUB_REQUEST_GET_STATUS),
-		.name = "GetHubStatus",
-		/* UHCI can't report OC condition or,
-		 * lose power source */
-		.callback = virthub_base_get_null_status,
-	},
-	{
-		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_OTHER, USB_HUB_REQUEST_GET_STATUS),
-		.name = "GetPortStatus",
-		.callback = req_get_port_status
-	},
-	{
-		CLASS_REQ_OUT(USB_REQUEST_RECIPIENT_DEVICE, USB_HUB_REQUEST_SET_FEATURE),
-		.name = "SetHubFeature",
-		/* Hub features are overcurrent and supply good,
-		 * this request may only set changes that we never report*/
-		.callback = req_nop,
-	},
-	{
-		CLASS_REQ_OUT(USB_REQUEST_RECIPIENT_OTHER, USB_HUB_REQUEST_SET_FEATURE),
-		.name = "SetPortFeature",
-		.callback = req_set_port_feature
-	},
-	{
-		.callback = NULL
-	}
-};
-
-static int req_status_change_handler(usbvirt_device_t *dev,
-    usb_endpoint_t endpoint, usb_transfer_type_t tr_type,
-    void *buffer, size_t buffer_size, size_t *actual_size);
-
-static usbvirt_device_ops_t ops = {
-        .control = control_transfer_handlers,
-        .data_in[HUB_STATUS_CHANGE_PIPE] = req_status_change_handler,
-};
-
 /** Status change handler.
  * @param device Virtual hub device
- * @param endpoint Enpoint number
+ * @param endpoint Endpoint number
  * @param tr_type Transfer type
  * @param buffer Response destination
- * @param buffer_size BYtes available in buffer
+ * @param buffer_size Bytes available in buffer
  * @param actual_size Size us the used part of the dest buffer.
  *
  * Produces status mask. Bit 0 indicates hub status change the other bits
- * represnet port status change. Endian does not matter as UHCI root hubs
+ * represent port status change. Endian does not matter as UHCI root hubs
  * only need 1 byte.
  */
@@ -470,5 +392,5 @@
 	uhci_rh_t *hub = virthub_get_data(device);
 	assert(hub);
-	
+
 	if (buffer_size < 1)
 		return ESTALL;
@@ -491,2 +413,75 @@
 	return EOK;
 }
+
+/** UHCI root hub request handlers */
+static const usbvirt_control_request_handler_t control_transfer_handlers[] = {
+	{
+		STD_REQ_IN(USB_REQUEST_RECIPIENT_DEVICE, USB_DEVREQ_GET_DESCRIPTOR),
+		.name = "GetDescriptor",
+		.callback = virthub_base_get_hub_descriptor,
+	},
+	{
+		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_DEVICE, USB_DEVREQ_GET_DESCRIPTOR),
+		.name = "GetDescriptor",
+		.callback = virthub_base_get_hub_descriptor,
+	},
+	{
+		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_DEVICE, USB_HUB_REQUEST_GET_DESCRIPTOR),
+		.name = "GetHubDescriptor",
+		.callback = virthub_base_get_hub_descriptor,
+	},
+	{
+		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_OTHER, USB_HUB_REQUEST_GET_STATE),
+		.name = "GetBusState",
+		.callback = req_get_port_state,
+	},
+	{
+		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_OTHER, USB_HUB_REQUEST_GET_STATUS),
+		.name = "GetPortStatus",
+		.callback = req_get_port_status
+	},
+	{
+		CLASS_REQ_OUT(USB_REQUEST_RECIPIENT_DEVICE, USB_HUB_REQUEST_CLEAR_FEATURE),
+		.name = "ClearHubFeature",
+		/* Hub features are overcurrent and supply good,
+		 * this request may only clear changes that we never report*/
+		.callback = req_nop,
+	},
+	{
+		CLASS_REQ_OUT(USB_REQUEST_RECIPIENT_OTHER, USB_HUB_REQUEST_CLEAR_FEATURE),
+		.name = "ClearPortFeature",
+		.callback = req_clear_port_feature
+	},
+	{
+		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_DEVICE, USB_HUB_REQUEST_GET_STATUS),
+		.name = "GetHubStatus",
+		/* UHCI can't report OC condition or,
+		 * lose power source */
+		.callback = virthub_base_get_null_status,
+	},
+	{
+		CLASS_REQ_IN(USB_REQUEST_RECIPIENT_OTHER, USB_HUB_REQUEST_GET_STATUS),
+		.name = "GetPortStatus",
+		.callback = req_get_port_status
+	},
+	{
+		CLASS_REQ_OUT(USB_REQUEST_RECIPIENT_DEVICE, USB_HUB_REQUEST_SET_FEATURE),
+		.name = "SetHubFeature",
+		/* Hub features are overcurrent and supply good,
+		 * this request may only set changes that we never report*/
+		.callback = req_nop,
+	},
+	{
+		CLASS_REQ_OUT(USB_REQUEST_RECIPIENT_OTHER, USB_HUB_REQUEST_SET_FEATURE),
+		.name = "SetPortFeature",
+		.callback = req_set_port_feature
+	},
+	{
+		.callback = NULL
+	}
+};
+
+static usbvirt_device_ops_t ops = {
+        .control = control_transfer_handlers,
+        .data_in[HUB_STATUS_CHANGE_PIPE] = req_status_change_handler,
+};
