Index: uspace/drv/block/usbmast/scsi_ms.c
===================================================================
--- uspace/drv/block/usbmast/scsi_ms.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/block/usbmast/scsi_ms.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -88,7 +88,7 @@
 	rc = usb_massstor_cmd(mfun, 0xDEADBEEF, &cmd);
 
-        if (rc != EOK) {
+	if (rc != EOK) {
 		usb_log_error("Test Unit Ready failed on device %s: %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
+		    usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
 		return rc;
 	}
@@ -98,5 +98,5 @@
 	if (cmd.status != CMDS_GOOD)
 		usb_log_warning("Test Unit Ready command failed on device %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev));
+		    usb_device_get_name(mfun->mdev->usb_dev));
 
 	return EOK;
@@ -118,5 +118,5 @@
 		if (rc != EOK) {
 			usb_log_error("Inquiry transport failed, device %s: %s.",
-			   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
+			    usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
 			return rc;
 		}
@@ -125,5 +125,5 @@
 		if (rc != EOK) {
 			usb_log_error("Inquiry transport failed, device %s: %s.",
-			   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
+			    usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
 			return rc;
 		}
@@ -184,5 +184,5 @@
 	if (rc != EOK) {
 		usb_log_error("Inquiry transport failed, device %s: %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
+		    usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
 		return rc;
 	}
@@ -190,5 +190,5 @@
 	if (cmd.status != CMDS_GOOD) {
 		usb_log_error("Inquiry command failed, device %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev));
+		    usb_device_get_name(mfun->mdev->usb_dev));
 		return EIO;
 	}
@@ -196,5 +196,5 @@
 	if (cmd.rcvd_size < SCSI_STD_INQUIRY_DATA_MIN_SIZE) {
 		usb_log_error("SCSI Inquiry response too short (%zu).",
-		    cmd.rcvd_size);
+		     cmd.rcvd_size);
 		return EIO;
 	}
@@ -250,7 +250,7 @@
 	rc = usb_massstor_cmd(mfun, 0xDEADBEEF, &cmd);
 
-        if (rc != EOK || cmd.status != CMDS_GOOD) {
+	if (rc != EOK || cmd.status != CMDS_GOOD) {
 		usb_log_error("Request Sense failed, device %s: %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
+		    usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
 		return rc;
 	}
@@ -294,5 +294,5 @@
 	if (rc != EOK) {
 		usb_log_error("Read Capacity (10) transport failed, device %s: %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
+		    usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
 		return rc;
 	}
@@ -300,5 +300,5 @@
 	if (cmd.status != CMDS_GOOD) {
 		usb_log_error("Read Capacity (10) command failed, device %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev));
+		    usb_device_get_name(mfun->mdev->usb_dev));
 		return EIO;
 	}
@@ -306,5 +306,5 @@
 	if (cmd.rcvd_size < sizeof(data)) {
 		usb_log_error("SCSI Read Capacity response too short (%zu).",
-		    cmd.rcvd_size);
+		     cmd.rcvd_size);
 		return EIO;
 	}
@@ -351,5 +351,5 @@
         if (rc != EOK) {
 		usb_log_error("Read (10) transport failed, device %s: %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
+		    usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
 		return rc;
 	}
@@ -357,5 +357,5 @@
 	if (cmd.status != CMDS_GOOD) {
 		usb_log_error("Read (10) command failed, device %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev));
+		    usb_device_get_name(mfun->mdev->usb_dev));
 		return EIO;
 	}
@@ -405,7 +405,7 @@
 	rc = usbmast_run_cmd(mfun, &cmd);
 
-        if (rc != EOK) {
+	if (rc != EOK) {
 		usb_log_error("Write (10) transport failed, device %s: %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
+		    usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
 		return rc;
 	}
@@ -413,5 +413,5 @@
 	if (cmd.status != CMDS_GOOD) {
 		usb_log_error("Write (10) command failed, device %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev));
+		    usb_device_get_name(mfun->mdev->usb_dev));
 		return EIO;
 	}
@@ -452,5 +452,5 @@
 	if (rc != EOK) {
 		usb_log_error("Synchronize Cache (10) transport failed, device %s: %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
+		    usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
 		return rc;
 	}
@@ -458,5 +458,5 @@
 	if (cmd.status != CMDS_GOOD) {
 		usb_log_error("Synchronize Cache (10) command failed, device %s.",
-		   usb_device_get_name(mfun->mdev->usb_dev));
+		    usb_device_get_name(mfun->mdev->usb_dev));
 		return EIO;
 	}
Index: uspace/drv/bus/usb/ehci/ehci_batch.h
===================================================================
--- uspace/drv/bus/usb/ehci/ehci_batch.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ehci/ehci_batch.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -63,5 +63,5 @@
 } ehci_transfer_batch_t;
 
-ehci_transfer_batch_t * ehci_transfer_batch_create(endpoint_t *ep);
+ehci_transfer_batch_t *ehci_transfer_batch_create(endpoint_t *ep);
 int ehci_transfer_batch_prepare(ehci_transfer_batch_t *batch);
 void ehci_transfer_batch_commit(const ehci_transfer_batch_t *batch);
@@ -69,5 +69,6 @@
 void ehci_transfer_batch_destroy(ehci_transfer_batch_t *batch);
 
-static inline ehci_transfer_batch_t * ehci_transfer_batch_get(usb_transfer_batch_t *usb_batch)
+static inline ehci_transfer_batch_t *ehci_transfer_batch_get(
+    usb_transfer_batch_t *usb_batch)
 {
 	assert(usb_batch);
Index: uspace/drv/bus/usb/ehci/ehci_bus.c
===================================================================
--- uspace/drv/bus/usb/ehci/ehci_bus.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ehci/ehci_bus.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -54,5 +54,6 @@
 	ehci_endpoint_t *instance = ehci_endpoint_get(ep);
 	if (qh_toggle_from_td(instance->qh))
-		usb_log_warning("EP(%p): Resetting toggle bit for transfer directed EP", instance);
+		usb_log_warning("EP(%p): Resetting toggle bit for transfer "
+		    "directed EP", instance);
 	qh_toggle_set(instance->qh, 0);
 }
@@ -72,5 +73,6 @@
 /** Creates new hcd endpoint representation.
  */
-static endpoint_t *ehci_endpoint_create(device_t *dev, const usb_endpoint_descriptors_t *desc)
+static endpoint_t *ehci_endpoint_create(device_t *dev,
+    const usb_endpoint_descriptors_t *desc)
 {
 	assert(dev);
Index: uspace/drv/bus/usb/ehci/ehci_bus.h
===================================================================
--- uspace/drv/bus/usb/ehci/ehci_bus.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ehci/ehci_bus.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -78,5 +78,5 @@
  * @return Pointer to assigned ehci endpoint structure
  */
-static inline ehci_endpoint_t * ehci_endpoint_get(const endpoint_t *ep)
+static inline ehci_endpoint_t *ehci_endpoint_get(const endpoint_t *ep)
 {
 	assert(ep);
@@ -84,5 +84,5 @@
 }
 
-static inline ehci_endpoint_t * ehci_endpoint_list_instance(link_t *l)
+static inline ehci_endpoint_t *ehci_endpoint_list_instance(link_t *l)
 {
 	return list_get_instance(l, ehci_endpoint_t, eplist_link);
Index: uspace/drv/bus/usb/ehci/ehci_rh.h
===================================================================
--- uspace/drv/bus/usb/ehci/ehci_rh.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ehci/ehci_rh.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -80,6 +80,6 @@
 } ehci_rh_t;
 
-errno_t ehci_rh_init(ehci_rh_t *instance, ehci_caps_regs_t *caps, ehci_regs_t *regs,
-    fibril_mutex_t *guard, const char *name);
+errno_t ehci_rh_init(ehci_rh_t *instance, ehci_caps_regs_t *caps,
+    ehci_regs_t *regs, fibril_mutex_t *guard, const char *name);
 errno_t ehci_rh_schedule(ehci_rh_t *instance, usb_transfer_batch_t *batch);
 errno_t ehci_rh_interrupt(ehci_rh_t *instance);
Index: uspace/drv/bus/usb/ehci/hc.h
===================================================================
--- uspace/drv/bus/usb/ehci/hc.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ehci/hc.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -104,5 +104,6 @@
 extern errno_t hc_start(hc_device_t *);
 extern errno_t hc_setup_roothub(hc_device_t *);
-extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
+extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *,
+    const hw_res_list_parsed_t *, int *);
 extern errno_t hc_gone(hc_device_t *);
 
Index: uspace/drv/bus/usb/ehci/hw_struct/iso_transfer_descriptor.h
===================================================================
--- uspace/drv/bus/usb/ehci/hw_struct/iso_transfer_descriptor.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ehci/hw_struct/iso_transfer_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -72,5 +72,5 @@
 	/* 64 bit struct only */
 	volatile uint32_t extended_bp[7];
-} __attribute__((packed,aligned(32))) itd_t;
+} __attribute__((packed, aligned(32))) itd_t;
 #endif
 /**
Index: uspace/drv/bus/usb/ehci/hw_struct/queue_head.c
===================================================================
--- uspace/drv/bus/usb/ehci/hw_struct/queue_head.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ehci/hw_struct/queue_head.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -70,6 +70,5 @@
 	    QH_EP_CHAR_EP_SET(ep->endpoint) |
 	    speed[ep->device->speed] |
-	    QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size)
-	);
+	    QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size));
 	if (ep->transfer_type == USB_TRANSFER_CONTROL) {
 		if (ep->device->speed != USB_SPEED_HIGH)
@@ -80,5 +79,5 @@
 	}
 	uint32_t ep_cap = QH_EP_CAP_C_MASK_SET(3 << 2) |
-		    QH_EP_CAP_MULTI_SET(ep->packets_per_uframe);
+	    QH_EP_CAP_MULTI_SET(ep->packets_per_uframe);
 	if (usb_speed_is_11(ep->device->speed)) {
 		assert(ep->device->tt.dev != NULL);
Index: uspace/drv/bus/usb/ehci/hw_struct/queue_head.h
===================================================================
--- uspace/drv/bus/usb/ehci/hw_struct/queue_head.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ehci/hw_struct/queue_head.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -143,5 +143,5 @@
 	/* 64 bit struct only */
 	volatile uint32_t extended_bp[5];
-} __attribute__((packed,aligned(32))) qh_t;
+} __attribute__((packed, aligned(32))) qh_t;
 
 static inline void qh_append_qh(qh_t *qh, const qh_t *next)
Index: uspace/drv/bus/usb/ehci/hw_struct/split_iso_transfer_descriptor.h
===================================================================
--- uspace/drv/bus/usb/ehci/hw_struct/split_iso_transfer_descriptor.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ehci/hw_struct/split_iso_transfer_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -89,5 +89,5 @@
 	/* 64 bit struct only */
 	volatile uint32_t extended_bp[2];
-} __attribute__((packed,aligned(32))) sitd_t;
+} __attribute__((packed, aligned(32))) sitd_t;
 #endif
 /**
Index: uspace/drv/bus/usb/ohci/hc.h
===================================================================
--- uspace/drv/bus/usb/ohci/hc.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ohci/hc.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -84,5 +84,5 @@
 } hc_t;
 
-static inline hc_t * hcd_to_hc(hc_device_t *hcd)
+static inline hc_t *hcd_to_hc(hc_device_t *hcd)
 {
 	assert(hcd);
@@ -91,5 +91,6 @@
 
 extern errno_t hc_add(hc_device_t *, const hw_res_list_parsed_t *);
-extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
+extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *,
+    const hw_res_list_parsed_t *, int *);
 extern errno_t hc_gain_control(hc_device_t *);
 extern errno_t hc_start(hc_device_t *);
Index: uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c
===================================================================
--- uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -84,6 +84,5 @@
 	    | ((ep->endpoint & ED_STATUS_EN_MASK) << ED_STATUS_EN_SHIFT)
 	    | ((dir[ep->direction] & ED_STATUS_D_MASK) << ED_STATUS_D_SHIFT)
-	    | ((ep->max_packet_size & ED_STATUS_MPS_MASK)
-	        << ED_STATUS_MPS_SHIFT));
+	    | ((ep->max_packet_size & ED_STATUS_MPS_MASK) << ED_STATUS_MPS_SHIFT));
 
 	/* Low speed flag */
Index: uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.h
===================================================================
--- uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -107,5 +107,5 @@
 #define ED_NEXT_PTR_MASK (0xfffffff0)
 #define ED_NEXT_PTR_SHIFT (0)
-} __attribute__((packed,aligned(32))) ed_t;
+} __attribute__((packed, aligned(32))) ed_t;
 
 void ed_init(ed_t *instance, const endpoint_t *ep, const td_t *td);
@@ -204,5 +204,5 @@
 {
 	assert(instance);
-	return (OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_TOGGLE_CARRY) ? 1 : 0;
+	return !!(OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_TOGGLE_CARRY);
 }
 
Index: uspace/drv/bus/usb/ohci/hw_struct/iso_transfer_descriptor.h
===================================================================
--- uspace/drv/bus/usb/ohci/hw_struct/iso_transfer_descriptor.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ohci/hw_struct/iso_transfer_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -69,5 +69,5 @@
 #define ITD_OFFSET_CC_SHIFT (12)
 
-} __attribute__((packed,aligned(32))) itd_t;
+} __attribute__((packed, aligned(32))) itd_t;
 
 #endif
Index: uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.h
===================================================================
--- uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -90,5 +90,5 @@
 	 */
 	volatile uint32_t be;
-} __attribute__((packed,aligned(32))) td_t;
+} __attribute__((packed, aligned(32))) td_t;
 
 void td_init(td_t *, const td_t *, usb_direction_t, const void *, size_t, int);
@@ -103,6 +103,6 @@
 {
 	assert(instance);
-	const int cc =(OHCI_MEM32_RD(instance->status)
-	    >> TD_STATUS_CC_SHIFT) & TD_STATUS_CC_MASK;
+	const int cc = (OHCI_MEM32_RD(instance->status) >> TD_STATUS_CC_SHIFT)
+		& TD_STATUS_CC_MASK;
 	/* This value is changed on transfer completion,
 	 * either to CC_NOERROR or and error code.
Index: uspace/drv/bus/usb/ohci/ohci_batch.h
===================================================================
--- uspace/drv/bus/usb/ohci/ohci_batch.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ohci/ohci_batch.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -65,5 +65,5 @@
 } ohci_transfer_batch_t;
 
-ohci_transfer_batch_t * ohci_transfer_batch_create(endpoint_t *batch);
+ohci_transfer_batch_t *ohci_transfer_batch_create(endpoint_t *batch);
 int ohci_transfer_batch_prepare(ohci_transfer_batch_t *ohci_batch);
 void ohci_transfer_batch_commit(const ohci_transfer_batch_t *batch);
@@ -71,5 +71,6 @@
 void ohci_transfer_batch_destroy(ohci_transfer_batch_t *ohci_batch);
 
-static inline ohci_transfer_batch_t * ohci_transfer_batch_get(usb_transfer_batch_t *usb_batch)
+static inline ohci_transfer_batch_t *ohci_transfer_batch_get(
+    usb_transfer_batch_t *usb_batch)
 {
 	assert(usb_batch);
Index: uspace/drv/bus/usb/ohci/ohci_bus.c
===================================================================
--- uspace/drv/bus/usb/ohci/ohci_bus.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/ohci/ohci_bus.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -72,5 +72,6 @@
 /** Creates new hcd endpoint representation.
  */
-static endpoint_t *ohci_endpoint_create(device_t *dev, const usb_endpoint_descriptors_t *desc)
+static endpoint_t *ohci_endpoint_create(device_t *dev,
+    const usb_endpoint_descriptors_t *desc)
 {
 	assert(dev);
@@ -82,5 +83,6 @@
 	endpoint_init(&ohci_ep->base, dev, desc);
 
-	const errno_t err = dma_buffer_alloc(&ohci_ep->dma_buffer, sizeof(ed_t) + 2 * sizeof(td_t));
+	const errno_t err = dma_buffer_alloc(&ohci_ep->dma_buffer,
+	    sizeof(ed_t) + 2 * sizeof(td_t));
 	if (err) {
 		free(ohci_ep);
Index: uspace/drv/bus/usb/uhci/hw_struct/queue_head.h
===================================================================
--- uspace/drv/bus/usb/uhci/hw_struct/queue_head.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/uhci/hw_struct/queue_head.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -48,7 +48,10 @@
 	/** Pointer to the next entity (another QH or TD */
 	volatile link_pointer_t next;
-	/** Pointer to the contained entities (execution controlled by vertical flag*/
+	/**
+	 * Pointer to the contained entities
+	 * (execution controlled by vertical flag)
+	 */
 	volatile link_pointer_t element;
-} __attribute__((packed,aligned(16))) qh_t;
+} __attribute__((packed, aligned(16))) qh_t;
 
 /** Initialize queue head structure
Index: uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.h
===================================================================
--- uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -95,5 +95,5 @@
 	 * memory just needs to be aligned. We don't use it anyway.
 	 */
-} __attribute__((packed,aligned(16))) td_t;
+} __attribute__((packed, aligned(16))) td_t;
 
 
Index: uspace/drv/bus/usb/uhci/uhci_batch.h
===================================================================
--- uspace/drv/bus/usb/uhci/uhci_batch.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/uhci/uhci_batch.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -70,5 +70,5 @@
 } uhci_transfer_batch_t;
 
-uhci_transfer_batch_t * uhci_transfer_batch_create(endpoint_t *);
+uhci_transfer_batch_t *uhci_transfer_batch_create(endpoint_t *);
 int uhci_transfer_batch_prepare(uhci_transfer_batch_t *);
 bool uhci_transfer_batch_check_completed(uhci_transfer_batch_t *);
@@ -79,5 +79,5 @@
  * @return Pointer to the setup buffer.
  */
-static inline void * uhci_transfer_batch_setup_buffer(
+static inline void *uhci_transfer_batch_setup_buffer(
     const uhci_transfer_batch_t *uhci_batch)
 {
@@ -91,5 +91,5 @@
  * @return Pointer to the data buffer.
  */
-static inline void * uhci_transfer_batch_data_buffer(
+static inline void *uhci_transfer_batch_data_buffer(
     const uhci_transfer_batch_t *uhci_batch)
 {
@@ -108,5 +108,6 @@
 }
 
-static inline uhci_transfer_batch_t *uhci_transfer_batch_get(usb_transfer_batch_t *b)
+static inline uhci_transfer_batch_t *uhci_transfer_batch_get(
+    usb_transfer_batch_t *b)
 {
 	assert(b);
Index: uspace/drv/bus/usb/usbdiag/device.h
===================================================================
--- uspace/drv/bus/usb/usbdiag/device.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/usbdiag/device.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -77,8 +77,9 @@
 } usbdiag_dev_t;
 
-errno_t usbdiag_dev_create(usb_device_t *, usbdiag_dev_t **, const usb_endpoint_description_t **);
+errno_t usbdiag_dev_create(usb_device_t *, usbdiag_dev_t **,
+    const usb_endpoint_description_t **);
 void usbdiag_dev_destroy(usbdiag_dev_t *);
 
-static inline usbdiag_dev_t * usb_device_to_usbdiag_dev(usb_device_t *usb_dev)
+static inline usbdiag_dev_t *usb_device_to_usbdiag_dev(usb_device_t *usb_dev)
 {
 	assert(usb_dev);
@@ -86,5 +87,5 @@
 }
 
-static inline usbdiag_dev_t * ddf_dev_to_usbdiag_dev(ddf_dev_t *ddf_dev)
+static inline usbdiag_dev_t *ddf_dev_to_usbdiag_dev(ddf_dev_t *ddf_dev)
 {
 	assert(ddf_dev);
@@ -92,5 +93,5 @@
 }
 
-static inline usbdiag_dev_t * ddf_fun_to_usbdiag_dev(ddf_fun_t *ddf_fun)
+static inline usbdiag_dev_t *ddf_fun_to_usbdiag_dev(ddf_fun_t *ddf_fun)
 {
 	assert(ddf_fun);
Index: uspace/drv/bus/usb/usbdiag/tests.h
===================================================================
--- uspace/drv/bus/usb/usbdiag/tests.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/usbdiag/tests.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -39,6 +39,8 @@
 #include <ddf/driver.h>
 
-errno_t usbdiag_dev_test_in(ddf_fun_t *, const usbdiag_test_params_t *, usbdiag_test_results_t *);
-errno_t usbdiag_dev_test_out(ddf_fun_t *, const usbdiag_test_params_t *, usbdiag_test_results_t *);
+errno_t usbdiag_dev_test_in(ddf_fun_t *, const usbdiag_test_params_t *,
+    usbdiag_test_results_t *);
+errno_t usbdiag_dev_test_out(ddf_fun_t *, const usbdiag_test_params_t *,
+    usbdiag_test_results_t *);
 
 #endif /* USBDIAG_TESTS_H_ */
Index: uspace/drv/bus/usb/usbhub/port.c
===================================================================
--- uspace/drv/bus/usb/usbhub/port.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/usbhub/port.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -49,5 +49,8 @@
 #include "status.h"
 
-#define port_log(lvl, port, fmt, ...) do { usb_log_##lvl("(%p-%u): " fmt, (port->hub), (port->port_number), ##__VA_ARGS__); } while (0)
+#define port_log(lvl, port, fmt, ...) do { \
+		usb_log_##lvl("(%p-%u): " fmt, \
+		    (port->hub), (port->port_number), ##__VA_ARGS__); \
+	} while (0)
 
 /** Initialize hub port information.
@@ -55,5 +58,6 @@
  * @param port Port to be initialized.
  */
-void usb_hub_port_init(usb_hub_port_t *port, usb_hub_dev_t *hub, unsigned int port_number)
+void usb_hub_port_init(usb_hub_port_t *port, usb_hub_dev_t *hub,
+    unsigned int port_number)
 {
 	assert(port);
@@ -79,5 +83,6 @@
 	async_exch_t *exch = usb_device_bus_exchange_begin(port->hub->usb_device);
 	if (!exch) {
-		port_log(error, port, "Cannot remove the device, failed creating exchange.");
+		port_log(error, port, "Cannot remove the device, "
+		    "failed creating exchange.");
 		return;
 	}
@@ -85,5 +90,6 @@
 	const errno_t err = usbhc_device_remove(exch, port->port_number);
 	if (err)
-		port_log(error, port, "Failed to remove device: %s", str_error(err));
+		port_log(error, port, "Failed to remove device: %s",
+		    str_error(err));
 
 	usb_device_bus_exchange_end(exch);
@@ -109,5 +115,6 @@
 	err = usb_hub_reserve_default_address(port->hub, exch, &port->base);
 	if (err != EOK) {
-		port_log(error, port, "Failed to reserve default address: %s", str_error(err));
+		port_log(error, port, "Failed to reserve default address: %s",
+		    str_error(err));
 		return err;
 	}
@@ -118,19 +125,25 @@
 
 	port_log(debug, port, "Resetting port.");
-	if ((err = usb_hub_set_port_feature(port->hub, port->port_number, USB_HUB_FEATURE_PORT_RESET))) {
-		port_log(warning, port, "Port reset request failed: %s", str_error(err));
+	if ((err = usb_hub_set_port_feature(port->hub, port->port_number,
+			    USB_HUB_FEATURE_PORT_RESET))) {
+		port_log(warning, port, "Port reset request failed: %s",
+		    str_error(err));
 		goto out_address;
 	}
 
 	if ((err = usb_port_wait_for_enabled(&port->base))) {
-		port_log(error, port, "Failed to reset port: %s", str_error(err));
+		port_log(error, port, "Failed to reset port: %s",
+		    str_error(err));
 		goto out_address;
 	}
 
 	port_log(debug, port, "Enumerating device.");
-	if ((err = usbhc_device_enumerate(exch, port->port_number, port->speed))) {
-		port_log(error, port, "Failed to enumerate device: %s", str_error(err));
+	if ((err = usbhc_device_enumerate(exch, port->port_number,
+			    port->speed))) {
+		port_log(error, port, "Failed to enumerate device: %s",
+		    str_error(err));
 		/* Disable the port */
-		usb_hub_clear_port_feature(port->hub, port->port_number, USB2_HUB_FEATURE_PORT_ENABLE);
+		usb_hub_clear_port_feature(port->hub, port->port_number,
+		    USB2_HUB_FEATURE_PORT_ENABLE);
 		goto out_address;
 	}
@@ -151,17 +164,22 @@
 
 	port_log(debug, port, "Issuing a warm reset.");
-	if ((err = usb_hub_set_port_feature(port->hub, port->port_number, USB3_HUB_FEATURE_BH_PORT_RESET))) {
-		port_log(warning, port, "Port reset request failed: %s", str_error(err));
+	if ((err = usb_hub_set_port_feature(port->hub, port->port_number,
+			    USB3_HUB_FEATURE_BH_PORT_RESET))) {
+		port_log(warning, port, "Port reset request failed: %s",
+		    str_error(err));
 		return err;
 	}
 
 	if ((err = usb_port_wait_for_enabled(&port->base))) {
-		port_log(error, port, "Failed to reset port: %s", str_error(err));
+		port_log(error, port, "Failed to reset port: %s",
+		    str_error(err));
 		return err;
 	}
 
 	port_log(debug, port, "Enumerating device.");
-	if ((err = usbhc_device_enumerate(exch, port->port_number, port->speed))) {
-		port_log(error, port, "Failed to enumerate device: %s", str_error(err));
+	if ((err = usbhc_device_enumerate(exch, port->port_number,
+			    port->speed))) {
+		port_log(error, port, "Failed to enumerate device: %s",
+		    str_error(err));
 		return err;
 	}
@@ -193,5 +211,6 @@
 {
 	const bool connected = !!(status & USB_HUB_PORT_STATUS_CONNECTION);
-	port_log(debug, port, "Connection change: device %s.", connected ? "attached" : "removed");
+	port_log(debug, port, "Connection change: device %s.", connected
+	    ? "attached" : "removed");
 
 	if (connected) {
@@ -212,5 +231,6 @@
 }
 
-static void port_changed_overcurrent(usb_hub_port_t *port, usb_port_status_t status)
+static void port_changed_overcurrent(usb_hub_port_t *port,
+    usb_port_status_t status)
 {
 	const bool overcurrent = !!(status & USB_HUB_PORT_STATUS_OC);
@@ -225,7 +245,9 @@
 
 	if (!overcurrent) {
-		const errno_t err = usb_hub_set_port_feature(port->hub, port->port_number, USB_HUB_FEATURE_PORT_POWER);
+		const errno_t err = usb_hub_set_port_feature(port->hub,
+		    port->port_number, USB_HUB_FEATURE_PORT_POWER);
 		if (err)
-			port_log(error, port, "Failed to set port power after OC: %s.", str_error(err));
+			port_log(error, port, "Failed to set port power "
+			    "after OC: %s.", str_error(err));
 	}
 }
@@ -245,5 +267,6 @@
 
 static void check_port_change(usb_hub_port_t *port, usb_port_status_t *status,
-    change_handler_t handler, usb_port_status_t mask, usb_hub_class_feature_t feature)
+    change_handler_t handler, usb_port_status_t mask,
+    usb_hub_class_feature_t feature)
 {
 	if ((*status & mask) == 0)
@@ -273,12 +296,15 @@
 
 	usb_port_status_t status = 0;
-	const errno_t err = usb_hub_get_port_status(port->hub, port->port_number, &status);
+	const errno_t err = usb_hub_get_port_status(port->hub,
+	    port->port_number, &status);
 	if (err != EOK) {
-		port_log(error, port, "Failed to get port status: %s.", str_error(err));
+		port_log(error, port, "Failed to get port status: %s.",
+		    str_error(err));
 		return;
 	}
 
 	check_port_change(port, &status, &port_changed_connection,
-	    USB_HUB_PORT_STATUS_C_CONNECTION, USB_HUB_FEATURE_C_PORT_CONNECTION);
+	    USB_HUB_PORT_STATUS_C_CONNECTION,
+	    USB_HUB_FEATURE_C_PORT_CONNECTION);
 
 	check_port_change(port, &status, &port_changed_overcurrent,
@@ -290,16 +316,20 @@
 	if (port->hub->speed <= USB_SPEED_HIGH) {
 		check_port_change(port, &status, &port_changed_enabled,
-		    USB2_HUB_PORT_STATUS_C_ENABLE, USB2_HUB_FEATURE_C_PORT_ENABLE);
+		    USB2_HUB_PORT_STATUS_C_ENABLE,
+		    USB2_HUB_FEATURE_C_PORT_ENABLE);
 	} else {
 		check_port_change(port, &status, &port_changed_reset,
-		    USB3_HUB_PORT_STATUS_C_BH_RESET, USB3_HUB_FEATURE_C_BH_PORT_RESET);
+		    USB3_HUB_PORT_STATUS_C_BH_RESET,
+		    USB3_HUB_FEATURE_C_BH_PORT_RESET);
 
 		check_port_change(port, &status, NULL,
-		    USB3_HUB_PORT_STATUS_C_LINK_STATE, USB3_HUB_FEATURE_C_PORT_LINK_STATE);
+		    USB3_HUB_PORT_STATUS_C_LINK_STATE,
+		    USB3_HUB_FEATURE_C_PORT_LINK_STATE);
 	}
 
 	/* Check for changes we ignored */
 	if (status & 0xffff0000) {
-		port_log(debug, port, "Port status change igored. Status: %#08" PRIx32, status);
+		port_log(debug, port, "Port status change igored. "
+		    "Status: %#08" PRIx32, status);
 	}
 }
Index: uspace/drv/bus/usb/usbhub/status.h
===================================================================
--- uspace/drv/bus/usb/usbhub/status.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/usbhub/status.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -59,5 +59,6 @@
 	if (hub_speed == USB_SPEED_SUPER)
 		return USB_SPEED_SUPER;
-	if (hub_speed == USB_SPEED_HIGH && (status & USB2_HUB_PORT_STATUS_HIGH_SPEED))
+	if (hub_speed == USB_SPEED_HIGH
+	    && (status & USB2_HUB_PORT_STATUS_HIGH_SPEED))
 		return USB_SPEED_HIGH;
 	if ((status & USB2_HUB_PORT_STATUS_LOW_SPEED) != 0)
Index: uspace/drv/bus/usb/usbhub/usbhub.h
===================================================================
--- uspace/drv/bus/usb/usbhub/usbhub.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/usbhub/usbhub.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -84,11 +84,15 @@
 
 errno_t usb_hub_set_depth(const usb_hub_dev_t *);
-errno_t usb_hub_get_port_status(const usb_hub_dev_t *, size_t, usb_port_status_t *);
-errno_t usb_hub_set_port_feature(const usb_hub_dev_t *, size_t, usb_hub_class_feature_t);
-errno_t usb_hub_clear_port_feature(const usb_hub_dev_t *, size_t, usb_hub_class_feature_t);
+errno_t usb_hub_get_port_status(const usb_hub_dev_t *, size_t,
+    usb_port_status_t *);
+errno_t usb_hub_set_port_feature(const usb_hub_dev_t *, size_t,
+    usb_hub_class_feature_t);
+errno_t usb_hub_clear_port_feature(const usb_hub_dev_t *, size_t,
+    usb_hub_class_feature_t);
 
 bool hub_port_changes_callback(usb_device_t *, uint8_t *, size_t, void *);
 
-errno_t usb_hub_reserve_default_address(usb_hub_dev_t *, async_exch_t *, usb_port_t *);
+errno_t usb_hub_reserve_default_address(usb_hub_dev_t *, async_exch_t *,
+    usb_port_t *);
 errno_t usb_hub_release_default_address(usb_hub_dev_t *, async_exch_t *);
 
Index: uspace/drv/bus/usb/usbmid/dump.c
===================================================================
--- uspace/drv/bus/usb/usbmid/dump.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/usbmid/dump.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -54,6 +54,6 @@
 	const int type = data[1];
 	if (type == USB_DESCTYPE_INTERFACE) {
-		usb_standard_interface_descriptor_t *descriptor
-		    = (usb_standard_interface_descriptor_t *) data;
+		usb_standard_interface_descriptor_t *descriptor =
+		    (usb_standard_interface_descriptor_t *) data;
 		usb_log_info("Found interface: %s (0x%02x/0x%02x/0x%02x).",
 		    usb_str_class(descriptor->interface_class),
Index: uspace/drv/bus/usb/vhc/hub/hub.c
===================================================================
--- uspace/drv/bus/usb/vhc/hub/hub.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/vhc/hub/hub.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -68,24 +68,25 @@
 
 /** Convert hub port state to a char. */
-char hub_port_state_to_char(hub_port_state_t state) {
+char hub_port_state_to_char(hub_port_state_t state)
+{
 	switch (state) {
-		case HUB_PORT_STATE_NOT_CONFIGURED:
-			return '-';
-		case HUB_PORT_STATE_POWERED_OFF:
-			return 'O';
-		case HUB_PORT_STATE_DISCONNECTED:
-			return 'X';
-		case HUB_PORT_STATE_DISABLED:
-			return 'D';
-		case HUB_PORT_STATE_RESETTING:
-			return 'R';
-		case HUB_PORT_STATE_ENABLED:
-			return 'E';
-		case HUB_PORT_STATE_SUSPENDED:
-			return 'S';
-		case HUB_PORT_STATE_RESUMING:
-			return 'F';
-		default:
-			return '?';
+	case HUB_PORT_STATE_NOT_CONFIGURED:
+		return '-';
+	case HUB_PORT_STATE_POWERED_OFF:
+		return 'O';
+	case HUB_PORT_STATE_DISCONNECTED:
+		return 'X';
+	case HUB_PORT_STATE_DISABLED:
+		return 'D';
+	case HUB_PORT_STATE_RESETTING:
+		return 'R';
+	case HUB_PORT_STATE_ENABLED:
+		return 'E';
+	case HUB_PORT_STATE_SUSPENDED:
+		return 'S';
+	case HUB_PORT_STATE_RESUMING:
+		return 'F';
+	default:
+		return '?';
 	}
 }
@@ -234,26 +235,26 @@
 
 	switch (state) {
-		case HUB_PORT_STATE_POWERED_OFF:
-			clear_port_status_change(port, HUB_STATUS_C_PORT_CONNECTION);
-			clear_port_status_change(port, HUB_STATUS_C_PORT_ENABLE);
-			clear_port_status_change(port, HUB_STATUS_C_PORT_RESET);
-			break;
-		case HUB_PORT_STATE_RESUMING:
-			port->state = state;
-			set_port_state_delayed(hub, port_index,
-			    10, state, HUB_PORT_STATE_ENABLED);
-			break;
-		case HUB_PORT_STATE_RESETTING:
-			port->state = state;
-			set_port_state_delayed(hub, port_index,
-			    10, state, HUB_PORT_STATE_ENABLED);
-			break;
-		case HUB_PORT_STATE_ENABLED:
-			if (port->state == HUB_PORT_STATE_RESETTING) {
-				set_port_status_change(port, HUB_STATUS_C_PORT_RESET);
-			}
-			break;
-		default:
-			break;
+	case HUB_PORT_STATE_POWERED_OFF:
+		clear_port_status_change(port, HUB_STATUS_C_PORT_CONNECTION);
+		clear_port_status_change(port, HUB_STATUS_C_PORT_ENABLE);
+		clear_port_status_change(port, HUB_STATUS_C_PORT_RESET);
+		break;
+	case HUB_PORT_STATE_RESUMING:
+		port->state = state;
+		set_port_state_delayed(hub, port_index,
+		    10, state, HUB_PORT_STATE_ENABLED);
+		break;
+	case HUB_PORT_STATE_RESETTING:
+		port->state = state;
+		set_port_state_delayed(hub, port_index,
+		    10, state, HUB_PORT_STATE_ENABLED);
+		break;
+	case HUB_PORT_STATE_ENABLED:
+		if (port->state == HUB_PORT_STATE_RESETTING) {
+			set_port_status_change(port, HUB_STATUS_C_PORT_RESET);
+		}
+		break;
+	default:
+		break;
 	}
 
@@ -336,6 +337,5 @@
 	}
 
-	uint32_t status;
-	status = MAKE_BYTE(
+	uint32_t status = MAKE_BYTE(
 	    /* Current connect status. */
 	    port->connected_device == NULL ? 0 : 1,
@@ -344,5 +344,5 @@
 	    /* Suspend. */
 	    (port->state == HUB_PORT_STATE_SUSPENDED)
-		|| (port->state == HUB_PORT_STATE_RESUMING) ? 1 : 0,
+	    || (port->state == HUB_PORT_STATE_RESUMING) ? 1 : 0,
 	    /* Over-current. */
 	    0,
@@ -350,7 +350,7 @@
 	    port->state == HUB_PORT_STATE_RESETTING ? 1 : 0,
 	    /* Reserved. */
-	    0, 0, 0)
-
-	    | (MAKE_BYTE(
+	    0, 0, 0);
+
+	status |= MAKE_BYTE(
 	    /* Port power. */
 	    port->state == HUB_PORT_STATE_POWERED_OFF ? 0 : 1,
@@ -359,5 +359,5 @@
 	    /* Reserved. */
 	    0, 0, 0, 0, 0, 0
-	    )) << 8;
+	    ) << 8;
 
 	status |= (port->status_change << 16);
@@ -463,6 +463,6 @@
 static errno_t set_port_state_delayed_fibril(void *arg)
 {
-	struct delay_port_state_change *change
-	    = (struct delay_port_state_change *) arg;
+	struct delay_port_state_change *change =
+	    (struct delay_port_state_change *) arg;
 
 	async_usleep(change->delay);
@@ -500,6 +500,6 @@
     hub_port_state_t old_state, hub_port_state_t new_state)
 {
-	struct delay_port_state_change *change
-	    = malloc(sizeof(struct delay_port_state_change));
+	struct delay_port_state_change *change =
+	    malloc(sizeof(struct delay_port_state_change));
 
 	change->hub = hub;
Index: uspace/drv/bus/usb/vhc/transfer.c
===================================================================
--- uspace/drv/bus/usb/vhc/transfer.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/vhc/transfer.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -50,6 +50,6 @@
 		return false;
 	}
-	const usb_device_request_setup_packet_t *setup
-		= &transfer->batch.setup.packet;
+	const usb_device_request_setup_packet_t *setup =
+	    &transfer->batch.setup.packet;
 	if (setup->request_type != 0) {
 		return false;
@@ -139,6 +139,7 @@
 	assert(!list_empty(&dev->transfer_queue));
 
-	vhc_transfer_t *transfer = list_get_instance(
-	    list_first(&dev->transfer_queue), vhc_transfer_t, link);
+	vhc_transfer_t *transfer =
+	    list_get_instance(list_first(&dev->transfer_queue),
+	    vhc_transfer_t, link);
 	list_remove(&transfer->link);
 
@@ -258,5 +259,6 @@
 			    dev->dev_local, &data_transfer_size);
 		} else {
-			usb_log_warning("Device has no remote phone nor local node.");
+			usb_log_warning("Device has no remote phone "
+			    "nor local node.");
 			rc = ESTALL;
 		}
@@ -269,5 +271,5 @@
 			if (is_set_address_transfer(transfer)) {
 				usb_device_request_setup_packet_t *setup =
-				    (void*) transfer->batch.setup.buffer;
+				    (void *) transfer->batch.setup.buffer;
 				dev->address = setup->value;
 				usb_log_debug2("Address changed to %d",
Index: uspace/drv/bus/usb/vhc/vhcd.h
===================================================================
--- uspace/drv/bus/usb/vhc/vhcd.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/vhc/vhcd.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -93,5 +93,6 @@
 errno_t vhc_virtdev_plug(vhc_data_t *, async_sess_t *, uintptr_t *);
 errno_t vhc_virtdev_plug_local(vhc_data_t *, usbvirt_device_t *, uintptr_t *);
-errno_t vhc_virtdev_plug_hub(vhc_data_t *, usbvirt_device_t *, uintptr_t *, usb_address_t address);
+errno_t vhc_virtdev_plug_hub(vhc_data_t *, usbvirt_device_t *, uintptr_t *,
+    usb_address_t address);
 void vhc_virtdev_unplug(vhc_data_t *, uintptr_t);
 
Index: uspace/drv/bus/usb/xhci/bus.h
===================================================================
--- uspace/drv/bus/usb/xhci/bus.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/bus.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -45,9 +45,7 @@
 /** Endpoint management structure */
 typedef struct xhci_bus {
-	bus_t base;		/**< Inheritance. Keep this first. */
-
-	xhci_hc_t *hc;				/**< Pointer to managing HC (to issue commands) */
-
-	xhci_device_t **devices_by_slot;	/**< Devices by Slot ID */
+	bus_t base; /**< Inheritance. Keep this first. */
+	xhci_hc_t *hc; /**< Pointer to managing HC (to issue commands) */
+	xhci_device_t **devices_by_slot; /**< Devices by Slot ID */
 } xhci_bus_t;
 
Index: uspace/drv/bus/usb/xhci/commands.c
===================================================================
--- uspace/drv/bus/usb/xhci/commands.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/commands.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -150,5 +150,6 @@
 
 	while (cmd_link != NULL) {
-		xhci_cmd_t *cmd = list_get_instance(cmd_link, xhci_cmd_t, _header.link);
+		xhci_cmd_t *cmd = list_get_instance(cmd_link, xhci_cmd_t,
+		    _header.link);
 
 		if (cmd->_header.trb_phys == phys)
@@ -158,6 +159,7 @@
 	}
 
-	return cmd_link ? list_get_instance(cmd_link, xhci_cmd_t, _header.link)
-		: NULL;
+	return cmd_link
+	    ? list_get_instance(cmd_link, xhci_cmd_t, _header.link)
+	    : NULL;
 }
 
@@ -167,6 +169,5 @@
 
 	cr->state = state;
-	if (state == XHCI_CR_STATE_OPEN
-	    || state == XHCI_CR_STATE_CLOSED)
+	if (state == XHCI_CR_STATE_OPEN || state == XHCI_CR_STATE_CLOSED)
 		fibril_condvar_broadcast(&cr->state_cv);
 }
@@ -206,5 +207,6 @@
 	}
 
-	usb_log_debug("Sending command %s", xhci_trb_str_type(TRB_TYPE(cmd->_header.trb)));
+	usb_log_debug("Sending command %s",
+	    xhci_trb_str_type(TRB_TYPE(cmd->_header.trb)));
 
 	list_append(&cmd->_header.link, &cr->cmd_list);
@@ -337,5 +339,6 @@
 		usb_log_error("Command resulted in error: %s.", trb_codes[code]);
 	else
-		usb_log_error("Command resulted in reserved or vendor specific error.");
+		usb_log_error("Command resulted in reserved or "
+		    "vendor specific error.");
 }
 
@@ -657,5 +660,6 @@
 	}
 
-	usb_log_error("Timeout while waiting for command: aborting current command.");
+	usb_log_error("Timeout while waiting for command: "
+	    "aborting current command.");
 
 	cr_set_state(cr, XHCI_CR_STATE_CHANGING);
@@ -663,5 +667,6 @@
 	abort_command_ring(hc);
 
-	fibril_condvar_wait_timeout(&cr->stopped_cv, &cr->guard, XHCI_CR_ABORT_TIMEOUT);
+	fibril_condvar_wait_timeout(&cr->stopped_cv, &cr->guard,
+	    XHCI_CR_ABORT_TIMEOUT);
 
 	if (XHCI_REG_RD(hc->op_regs, XHCI_OP_CRR)) {
Index: uspace/drv/bus/usb/xhci/commands.h
===================================================================
--- uspace/drv/bus/usb/xhci/commands.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/commands.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -70,8 +70,8 @@
 
 typedef enum {
-	XHCI_CR_STATE_CLOSED,		/**< Commands are rejected with ENAK. */
-	XHCI_CR_STATE_OPEN,		/**< Commands are enqueued normally. */
-	XHCI_CR_STATE_CHANGING,		/**< Commands wait until state changes. */
-	XHCI_CR_STATE_FULL,		/**< Commands wait until something completes. */
+	XHCI_CR_STATE_CLOSED,	/**< Commands are rejected with ENAK. */
+	XHCI_CR_STATE_OPEN,	/**< Commands are enqueued normally. */
+	XHCI_CR_STATE_CHANGING,	/**< Commands wait until state changes. */
+	XHCI_CR_STATE_FULL,	/**< Commands wait until something completes. */
 } xhci_cr_state_t;
 
Index: uspace/drv/bus/usb/xhci/debug.h
===================================================================
--- uspace/drv/bus/usb/xhci/debug.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/debug.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -63,5 +63,6 @@
 extern void xhci_dump_slot_ctx(const struct xhci_slot_ctx *);
 extern void xhci_dump_endpoint_ctx(const struct xhci_endpoint_ctx *);
-extern void xhci_dump_input_ctx(const struct xhci_hc *, const struct xhci_input_ctx *);
+extern void xhci_dump_input_ctx(const struct xhci_hc *,
+    const struct xhci_input_ctx *);
 
 #endif
Index: uspace/drv/bus/usb/xhci/device.h
===================================================================
--- uspace/drv/bus/usb/xhci/device.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/device.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -62,5 +62,5 @@
 
 #define XHCI_DEV_FMT  "(%s, slot %d)"
-#define XHCI_DEV_ARGS(dev)		 ddf_fun_get_name((dev).base.fun), (dev).slot_id
+#define XHCI_DEV_ARGS(dev)	ddf_fun_get_name((dev).base.fun), (dev).slot_id
 
 /* Bus callbacks */
@@ -72,5 +72,5 @@
 void xhci_setup_slot_context(xhci_device_t *, xhci_slot_ctx_t *);
 
-static inline xhci_device_t * xhci_device_get(device_t *dev)
+static inline xhci_device_t *xhci_device_get(device_t *dev)
 {
 	assert(dev);
Index: uspace/drv/bus/usb/xhci/endpoint.h
===================================================================
--- uspace/drv/bus/usb/xhci/endpoint.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/endpoint.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -76,5 +76,8 @@
 	xhci_trb_ring_t ring;
 
-	/** Primary stream context data array (or NULL if endpoint doesn't use streams). */
+	/**
+	 * Primary stream context data array
+	 * (or NULL if endpoint doesn't use streams).
+	 */
 	xhci_stream_data_t *primary_stream_data_array;
 
@@ -83,5 +86,5 @@
 	dma_buffer_t primary_stream_ctx_dma;
 
-	/** Size of the allocated primary stream data array (and context array). */
+	/** Size of the allocated primary stream data and context array. */
 	uint16_t primary_stream_data_size;
 
@@ -89,14 +92,26 @@
 	uint32_t max_streams;
 
-	/** Maximum number of consecutive USB transactions (0-15) that should be executed per scheduling opportunity */
+	/**
+	 * Maximum number of consecutive USB transactions (0-15) that
+	 * should be executed per scheduling opportunity
+	 */
 	uint8_t max_burst;
 
-	/** Maximum number of bursts within an interval that this endpoint supports */
+	/**
+	 * Maximum number of bursts within an interval that
+	 * this endpoint supports
+	 */
 	uint8_t mult;
 
-	/** Scheduling interval for periodic endpoints, as a number of 125us units. (0 - 2^16) */
+	/**
+	 * Scheduling interval for periodic endpoints,
+	 * as a number of 125us units. (0 - 2^16)
+	 */
 	uint32_t interval;
 
-	/** This field is a valid pointer for (and only for) isochronous transfers. */
+	/**
+	 * This field is a valid pointer for (and only for) isochronous
+	 * endpoints.
+	 */
 	xhci_isoch_t isoch [0];
 } xhci_endpoint_t;
@@ -111,5 +126,6 @@
 extern int xhci_endpoint_type(xhci_endpoint_t *ep);
 
-extern endpoint_t *xhci_endpoint_create(device_t *, const usb_endpoint_descriptors_t *);
+extern endpoint_t *xhci_endpoint_create(device_t *,
+    const usb_endpoint_descriptors_t *);
 extern errno_t xhci_endpoint_register(endpoint_t *);
 extern void xhci_endpoint_unregister(endpoint_t *);
@@ -122,5 +138,5 @@
 extern errno_t xhci_endpoint_clear_halt(xhci_endpoint_t *, unsigned);
 
-static inline xhci_endpoint_t * xhci_endpoint_get(endpoint_t *ep)
+static inline xhci_endpoint_t *xhci_endpoint_get(endpoint_t *ep)
 {
 	assert(ep);
@@ -128,5 +144,5 @@
 }
 
-static inline xhci_device_t * xhci_ep_to_dev(xhci_endpoint_t *ep)
+static inline xhci_device_t *xhci_ep_to_dev(xhci_endpoint_t *ep)
 {
 	assert(ep);
Index: uspace/drv/bus/usb/xhci/hc.h
===================================================================
--- uspace/drv/bus/usb/xhci/hc.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/hc.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -95,7 +95,7 @@
 	bool ac64;
 	bool csz;
-	uint64_t wrap_time;		/** The last time when mfindex wrap happened */
-	uint64_t wrap_count;	/** Amount of mfindex wraps HC has done */
-	unsigned ist;			/**< IST in microframes */
+	uint64_t wrap_time;	/**< The last time when mfindex wrap happened */
+	uint64_t wrap_count;	/**< Amount of mfindex wraps HC has done */
+	unsigned ist;		/**< IST in microframes */
 
 	/** Port speed mapping */
Index: uspace/drv/bus/usb/xhci/hw_struct/context.h
===================================================================
--- uspace/drv/bus/usb/xhci/hw_struct/context.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/hw_struct/context.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -179,5 +179,6 @@
 #define XHCI_CTX_SIZE_SMALL 32
 #define XHCI_ONE_CTX_SIZE(hc) (XHCI_CTX_SIZE_SMALL << hc->csz)
-#define XHCI_GET_CTX_FIELD(type, ctx, hc, ci) (xhci_##type##_ctx_to_charptr(ctx) + (ci) * XHCI_ONE_CTX_SIZE(hc))
+#define XHCI_GET_CTX_FIELD(type, ctx, hc, ci) \
+    (xhci_##type##_ctx_to_charptr(ctx) + (ci) * XHCI_ONE_CTX_SIZE(hc))
 
 /**
@@ -185,6 +186,8 @@
  */
 #define XHCI_DEVICE_CTX_SIZE(hc) ((1 + XHCI_EP_COUNT) * XHCI_ONE_CTX_SIZE(hc))
-#define XHCI_GET_EP_CTX(dev_ctx, hc, dci) ((xhci_ep_ctx_t *)   XHCI_GET_CTX_FIELD(device, (dev_ctx), (hc), (dci)))
-#define XHCI_GET_SLOT_CTX(dev_ctx, hc)    ((xhci_slot_ctx_t *) XHCI_GET_CTX_FIELD(device, (dev_ctx), (hc), 0))
+#define XHCI_GET_EP_CTX(dev_ctx, hc, dci) \
+    ((xhci_ep_ctx_t *)   XHCI_GET_CTX_FIELD(device, (dev_ctx), (hc), (dci)))
+#define XHCI_GET_SLOT_CTX(dev_ctx, hc) \
+    ((xhci_slot_ctx_t *) XHCI_GET_CTX_FIELD(device, (dev_ctx), (hc), 0))
 
 /**
@@ -210,8 +213,8 @@
 typedef struct xhci_stream_ctx {
 	uint64_t data [2];
-#define XHCI_STREAM_DCS(ctx)       XHCI_QWORD_EXTRACT((ctx).data[0],  0, 0)
-#define XHCI_STREAM_SCT(ctx)       XHCI_QWORD_EXTRACT((ctx).data[0],  3, 1)
-#define XHCI_STREAM_DEQ_PTR(ctx)   (XHCI_QWORD_EXTRACT((ctx).data[0], 63, 4) << 4)
-#define XHCI_STREAM_EDTLA(ctx)     XHCI_QWORD_EXTRACT((ctx).data[1], 24, 0)
+#define XHCI_STREAM_DCS(ctx)     XHCI_QWORD_EXTRACT((ctx).data[0],  0, 0)
+#define XHCI_STREAM_SCT(ctx)     XHCI_QWORD_EXTRACT((ctx).data[0],  3, 1)
+#define XHCI_STREAM_DEQ_PTR(ctx) (XHCI_QWORD_EXTRACT((ctx).data[0], 63, 4) << 4)
+#define XHCI_STREAM_EDTLA(ctx)   XHCI_QWORD_EXTRACT((ctx).data[1], 24, 0)
 
 #define XHCI_STREAM_SCT_SET(ctx, val) \
@@ -232,5 +235,5 @@
 	uint32_t data [8];
 #define XHCI_INPUT_CTRL_CTX_DROP(ctx, idx) \
-	XHCI_DWORD_EXTRACT((ctx).data[0], (idx), (idx))
+    XHCI_DWORD_EXTRACT((ctx).data[0], (idx), (idx))
 
 #define XHCI_INPUT_CTRL_CTX_DROP_SET(ctx, idx) (ctx).data[0] |= (1 << (idx))
@@ -238,12 +241,15 @@
 
 #define XHCI_INPUT_CTRL_CTX_ADD(ctx, idx) \
-	XHCI_DWORD_EXTRACT((ctx).data[1], (idx), (idx))
+    XHCI_DWORD_EXTRACT((ctx).data[1], (idx), (idx))
 
 #define XHCI_INPUT_CTRL_CTX_ADD_SET(ctx, idx) (ctx).data[1] |= (1 << (idx))
 #define XHCI_INPUT_CTRL_CTX_ADD_CLEAR(ctx, idx) (ctx).data[1] &= ~(1 << (idx))
 
-#define XHCI_INPUT_CTRL_CTX_CONFIG_VALUE(ctx)   XHCI_DWORD_EXTRACT((ctx).data[7],  7,  0)
-#define XHCI_INPUT_CTRL_CTX_IFACE_NUMBER(ctx)   XHCI_DWORD_EXTRACT((ctx).data[7], 15,  8)
-#define XHCI_INPUT_CTRL_CTX_ALTER_SETTING(ctx)  XHCI_DWORD_EXTRACT((ctx).data[7], 23, 16)
+#define XHCI_INPUT_CTRL_CTX_CONFIG_VALUE(ctx) \
+    XHCI_DWORD_EXTRACT((ctx).data[7],  7,  0)
+#define XHCI_INPUT_CTRL_CTX_IFACE_NUMBER(ctx) \
+    XHCI_DWORD_EXTRACT((ctx).data[7], 15,  8)
+#define XHCI_INPUT_CTRL_CTX_ALTER_SETTING(ctx) \
+    XHCI_DWORD_EXTRACT((ctx).data[7], 23, 16)
 } __attribute__((packed)) xhci_input_ctrl_ctx_t;
 
@@ -252,6 +258,8 @@
  */
 #define XHCI_INPUT_CTX_SIZE(hc) (XHCI_ONE_CTX_SIZE(hc) + XHCI_DEVICE_CTX_SIZE(hc))
-#define XHCI_GET_CTRL_CTX(ictx, hc)  ((xhci_input_ctrl_ctx_t *) XHCI_GET_CTX_FIELD(input, (ictx), (hc), 0))
-#define XHCI_GET_DEVICE_CTX(dev_ctx, hc) ((xhci_device_ctx_t *) XHCI_GET_CTX_FIELD(input, (ictx), (hc), 1))
+#define XHCI_GET_CTRL_CTX(ictx, hc) \
+    ((xhci_input_ctrl_ctx_t *) XHCI_GET_CTX_FIELD(input, (ictx), (hc), 0))
+#define XHCI_GET_DEVICE_CTX(dev_ctx, hc) \
+    ((xhci_device_ctx_t *) XHCI_GET_CTX_FIELD(input, (ictx), (hc), 1))
 
 typedef struct xhci_input_ctx {
Index: uspace/drv/bus/usb/xhci/hw_struct/trb.h
===================================================================
--- uspace/drv/bus/usb/xhci/hw_struct/trb.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/hw_struct/trb.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -160,5 +160,6 @@
  * The Chain bit is valid only in specific TRB types.
  */
-static inline bool xhci_trb_is_chained(xhci_trb_t *trb) {
+static inline bool xhci_trb_is_chained(xhci_trb_t *trb)
+{
 	const int type = TRB_TYPE(*trb);
 	const bool chain_bit = XHCI_DWORD_EXTRACT(trb->control, 4, 4);
Index: uspace/drv/bus/usb/xhci/isoch.h
===================================================================
--- uspace/drv/bus/usb/xhci/isoch.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/isoch.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -84,5 +84,8 @@
 	fibril_timer_t *reset_timer;
 
-	/** The maximum size of an isochronous transfer and therefore the size of buffers */
+	/**
+	 * The maximum size of an isochronous transfer
+	 * and therefore the size of buffers
+	 */
 	size_t max_size;
 
@@ -123,5 +126,6 @@
 extern errno_t isoch_schedule_out(xhci_transfer_t *);
 extern errno_t isoch_schedule_in(xhci_transfer_t *);
-extern void isoch_handle_transfer_event(xhci_hc_t *, xhci_endpoint_t *, xhci_trb_t *);
+extern void isoch_handle_transfer_event(xhci_hc_t *, xhci_endpoint_t *,
+    xhci_trb_t *);
 
 #endif
Index: uspace/drv/bus/usb/xhci/main.c
===================================================================
--- uspace/drv/bus/usb/xhci/main.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/main.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -68,5 +68,6 @@
 }
 
-static errno_t hcd_irq_code_gen(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res, int *irq)
+static errno_t hcd_irq_code_gen(irq_code_t *code, hc_device_t *hcd,
+    const hw_res_list_parsed_t *hw_res, int *irq)
 {
 	xhci_hc_t *hc = hcd_to_hc(hcd);
Index: uspace/drv/bus/usb/xhci/streams.h
===================================================================
--- uspace/drv/bus/usb/xhci/streams.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/streams.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -48,5 +48,8 @@
 	xhci_trb_ring_t ring;
 
-	/** Pointer to the array of secondary stream context data for primary data. */
+	/**
+	 * Pointer to the array of secondary stream context data for primary
+	 * data.
+	 */
 	xhci_stream_data_t *secondary_data;
 
@@ -61,12 +64,13 @@
 } xhci_stream_data_t;
 
-extern xhci_stream_data_t *xhci_get_stream_ctx_data(xhci_endpoint_t *ep, uint32_t stream_id);
-extern void xhci_stream_free_ds(xhci_endpoint_t *xhci_ep);
+extern xhci_stream_data_t *xhci_get_stream_ctx_data(xhci_endpoint_t *, uint32_t);
+extern void xhci_stream_free_ds(xhci_endpoint_t *);
 
-extern errno_t xhci_endpoint_remove_streams(xhci_hc_t *hc, xhci_device_t *dev, xhci_endpoint_t *xhci_ep);
-extern errno_t xhci_endpoint_request_primary_streams(xhci_hc_t *hc, xhci_device_t *dev,
-    xhci_endpoint_t *xhci_ep, unsigned count);
-extern errno_t xhci_endpoint_request_secondary_streams(xhci_hc_t *hc, xhci_device_t *dev,
-    xhci_endpoint_t *xhci_ep, unsigned *sizes, unsigned count);
+extern errno_t xhci_endpoint_remove_streams(xhci_hc_t *, xhci_device_t *,
+    xhci_endpoint_t *);
+extern errno_t xhci_endpoint_request_primary_streams(xhci_hc_t *,
+    xhci_device_t *, xhci_endpoint_t *, unsigned);
+extern errno_t xhci_endpoint_request_secondary_streams(xhci_hc_t *,
+    xhci_device_t *, xhci_endpoint_t *, unsigned *, unsigned);
 
 #endif
Index: uspace/drv/bus/usb/xhci/transfers.h
===================================================================
--- uspace/drv/bus/usb/xhci/transfers.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/transfers.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -59,5 +59,6 @@
 extern void xhci_transfer_destroy(usb_transfer_batch_t *);
 
-static inline xhci_transfer_t *xhci_transfer_from_batch(usb_transfer_batch_t *batch)
+static inline xhci_transfer_t *xhci_transfer_from_batch(
+    usb_transfer_batch_t *batch)
 {
 	assert(batch);
Index: uspace/drv/bus/usb/xhci/trb_ring.h
===================================================================
--- uspace/drv/bus/usb/xhci/trb_ring.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/drv/bus/usb/xhci/trb_ring.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -57,17 +57,17 @@
  */
 typedef struct xhci_trb_ring {
-	list_t segments;                /* List of assigned segments */
-	int segment_count;              /* Number of segments assigned */
+	list_t segments;                /**< List of assigned segments */
+	int segment_count;              /**< Number of segments assigned */
 
-	/*
-	 * As the link TRBs connect physical addresses, we need to keep track of
-	 * active segment in virtual memory. The enqueue ptr should always belong
-	 * to the enqueue segment.
+	/**
+	 * As the link TRBs connect physical addresses, we need to keep track
+	 * of active segment in virtual memory. The enqueue ptr should always
+	 * belong to the enqueue segment.
 	 */
 	trb_segment_t *enqueue_segment;
 	xhci_trb_t *enqueue_trb;
 
-	uintptr_t dequeue;              /* Last reported position of the dequeue pointer */
-	bool pcs;                       /* Producer Cycle State: section 4.9.2 */
+	uintptr_t dequeue; /**< Last reported position of the dequeue pointer */
+	bool pcs;          /**< Producer Cycle State: section 4.9.2 */
 
 	fibril_mutex_t guard;
@@ -76,9 +76,11 @@
 extern errno_t xhci_trb_ring_init(xhci_trb_ring_t *, size_t);
 extern void xhci_trb_ring_fini(xhci_trb_ring_t *);
-extern errno_t xhci_trb_ring_enqueue(xhci_trb_ring_t *, xhci_trb_t *, uintptr_t *);
-extern errno_t xhci_trb_ring_enqueue_multiple(xhci_trb_ring_t *, xhci_trb_t *, size_t, uintptr_t *);
+extern errno_t xhci_trb_ring_enqueue(xhci_trb_ring_t *, xhci_trb_t *,
+    uintptr_t *);
+extern errno_t xhci_trb_ring_enqueue_multiple(xhci_trb_ring_t *, xhci_trb_t *,
+    size_t, uintptr_t *);
 extern size_t xhci_trb_ring_size(xhci_trb_ring_t *);
 
-extern void xhci_trb_ring_reset_dequeue_state(xhci_trb_ring_t *ring, uintptr_t *addr);
+extern void xhci_trb_ring_reset_dequeue_state(xhci_trb_ring_t *, uintptr_t *);
 
 /**
@@ -86,5 +88,6 @@
  * pointer inside the ring. Otherwise, the ring will soon show up as full.
  */
-static inline void xhci_trb_ring_update_dequeue(xhci_trb_ring_t *ring, uintptr_t phys)
+static inline void xhci_trb_ring_update_dequeue(xhci_trb_ring_t *ring,
+    uintptr_t phys)
 {
 	ring->dequeue = phys;
@@ -95,14 +98,14 @@
  */
 typedef struct xhci_event_ring {
-	list_t segments;                /* List of assigned segments */
-	int segment_count;              /* Number of segments assigned */
+	list_t segments;                /**< List of assigned segments */
+	int segment_count;              /**< Number of segments assigned */
 
-	trb_segment_t *dequeue_segment; /* Current segment of the dequeue ptr */
-	xhci_trb_t *dequeue_trb;        /* Next TRB to be processed */
-	uintptr_t dequeue_ptr;          /* Physical address of the ERDP to be reported to the HC */
+	trb_segment_t *dequeue_segment; /**< Current segment */
+	xhci_trb_t *dequeue_trb;        /**< Next TRB to be processed */
+	uintptr_t dequeue_ptr;  /**< Physical ERDP to be reported to the HC */
 
-	dma_buffer_t erst;              /* ERST given to the HC */
+	dma_buffer_t erst;      /**< ERST given to the HC */
 
-	bool ccs;                       /* Consumer Cycle State: section 4.9.2 */
+	bool ccs;               /**< Consumer Cycle State: section 4.9.2 */
 
 	fibril_mutex_t guard;
Index: uspace/lib/drv/generic/remote_usb.c
===================================================================
--- uspace/lib/drv/generic/remote_usb.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/drv/generic/remote_usb.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -52,5 +52,6 @@
 usb_dev_session_t *usb_dev_connect_to_self(ddf_dev_t *dev)
 {
-	return devman_parent_device_connect(ddf_dev_get_handle(dev), IPC_FLAG_BLOCKING);
+	return devman_parent_device_connect(ddf_dev_get_handle(dev),
+	    IPC_FLAG_BLOCKING);
 }
 
@@ -90,5 +91,6 @@
 }
 
-static void remote_usb_get_my_description(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usb_get_my_description(ddf_fun_t *, void *,
+    ipc_callid_t, ipc_call_t *);
 
 /** Remote USB interface operations. */
Index: uspace/lib/drv/generic/remote_usbdiag.c
===================================================================
--- uspace/lib/drv/generic/remote_usbdiag.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/drv/generic/remote_usbdiag.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -58,5 +58,6 @@
 }
 
-errno_t usbdiag_test_in(async_exch_t *exch, const usbdiag_test_params_t *params, usbdiag_test_results_t *results)
+errno_t usbdiag_test_in(async_exch_t *exch,
+    const usbdiag_test_params_t *params, usbdiag_test_results_t *results)
 {
 	if (!exch)
@@ -64,14 +65,17 @@
 
 	ipc_call_t answer;
-	aid_t req = async_send_1(exch, DEV_IFACE_ID(USBDIAG_DEV_IFACE), IPC_M_USBDIAG_TEST_IN, &answer);
-
-	errno_t rc = async_data_write_start(exch, params, sizeof(usbdiag_test_params_t));
-	if (rc != EOK) {
-		async_exchange_end(exch);
-		async_forget(req);
-		return rc;
-	}
-
-	rc = async_data_read_start(exch, results, sizeof(usbdiag_test_results_t));
+	aid_t req = async_send_1(exch, DEV_IFACE_ID(USBDIAG_DEV_IFACE),
+	    IPC_M_USBDIAG_TEST_IN, &answer);
+
+	errno_t rc = async_data_write_start(exch, params,
+	    sizeof(usbdiag_test_params_t));
+	if (rc != EOK) {
+		async_exchange_end(exch);
+		async_forget(req);
+		return rc;
+	}
+
+	rc = async_data_read_start(exch, results,
+	    sizeof(usbdiag_test_results_t));
 	if (rc != EOK) {
 		async_exchange_end(exch);
@@ -88,5 +92,6 @@
 }
 
-errno_t usbdiag_test_out(async_exch_t *exch, const usbdiag_test_params_t *params, usbdiag_test_results_t *results)
+errno_t usbdiag_test_out(async_exch_t *exch,
+    const usbdiag_test_params_t *params, usbdiag_test_results_t *results)
 {
 	if (!exch)
@@ -94,14 +99,17 @@
 
 	ipc_call_t answer;
-	aid_t req = async_send_1(exch, DEV_IFACE_ID(USBDIAG_DEV_IFACE), IPC_M_USBDIAG_TEST_OUT, &answer);
-
-	errno_t rc = async_data_write_start(exch, params, sizeof(usbdiag_test_params_t));
-	if (rc != EOK) {
-		async_exchange_end(exch);
-		async_forget(req);
-		return rc;
-	}
-
-	rc = async_data_read_start(exch, results, sizeof(usbdiag_test_results_t));
+	aid_t req = async_send_1(exch, DEV_IFACE_ID(USBDIAG_DEV_IFACE),
+	    IPC_M_USBDIAG_TEST_OUT, &answer);
+
+	errno_t rc = async_data_write_start(exch, params,
+	    sizeof(usbdiag_test_params_t));
+	if (rc != EOK) {
+		async_exchange_end(exch);
+		async_forget(req);
+		return rc;
+	}
+
+	rc = async_data_read_start(exch, results,
+	    sizeof(usbdiag_test_results_t));
 	if (rc != EOK) {
 		async_exchange_end(exch);
@@ -118,6 +126,8 @@
 }
 
-static void remote_usbdiag_test_in(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
-static void remote_usbdiag_test_out(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_usbdiag_test_in(ddf_fun_t *, void *,
+    ipc_callid_t, ipc_call_t *);
+static void remote_usbdiag_test_out(ddf_fun_t *, void *,
+    ipc_callid_t, ipc_call_t *);
 
 /** Remote USB diagnostic interface operations. */
@@ -133,5 +143,6 @@
 };
 
-void remote_usbdiag_test_in(ddf_fun_t *fun, void *iface, ipc_callid_t callid, ipc_call_t *call)
+void remote_usbdiag_test_in(ddf_fun_t *fun, void *iface,
+    ipc_callid_t callid, ipc_call_t *call)
 {
 	const usbdiag_iface_t *diag_iface = (usbdiag_iface_t *) iface;
@@ -158,5 +169,6 @@
 
 	usbdiag_test_results_t results;
-	const errno_t ret = !diag_iface->test_in ? ENOTSUP : diag_iface->test_in(fun, &params, &results);
+	const errno_t ret = !diag_iface->test_in ? ENOTSUP
+	    : diag_iface->test_in(fun, &params, &results);
 
 	if (ret != EOK) {
@@ -185,5 +197,6 @@
 }
 
-void remote_usbdiag_test_out(ddf_fun_t *fun, void *iface, ipc_callid_t callid, ipc_call_t *call)
+void remote_usbdiag_test_out(ddf_fun_t *fun, void *iface,
+    ipc_callid_t callid, ipc_call_t *call)
 {
 	const usbdiag_iface_t *diag_iface = (usbdiag_iface_t *) iface;
@@ -210,5 +223,6 @@
 
 	usbdiag_test_results_t results;
-	const errno_t ret = !diag_iface->test_out ? ENOTSUP : diag_iface->test_out(fun, &params, &results);
+	const errno_t ret = !diag_iface->test_out ? ENOTSUP
+	    : diag_iface->test_out(fun, &params, &results);
 
 	if (ret != EOK) {
Index: uspace/lib/drv/include/usb_iface.h
===================================================================
--- uspace/lib/drv/include/usb_iface.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/drv/include/usb_iface.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -46,9 +46,10 @@
 
 typedef struct {
-	usb_address_t address;		/** Current USB address */
-	uint8_t depth;			/** Depth in the hub hiearchy */
-	usb_speed_t speed;		/** Speed of the device */
-	devman_handle_t handle;		/** Handle to DDF function of the HC driver */
-	int iface;			/** Interface set by multi interface driver, -1 if none */
+	usb_address_t address;	/**< Current USB address */
+	uint8_t depth;		/**< Depth in the hub hiearchy */
+	usb_speed_t speed;	/**< Speed of the device */
+	devman_handle_t handle;	/**< Handle to DDF function of the HC driver */
+	/** Interface set by multi interface driver,  -1 if none */
+	int iface;
 } usb_device_desc_t;
 
Index: uspace/lib/drv/include/usbdiag_iface.h
===================================================================
--- uspace/lib/drv/include/usbdiag_iface.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/drv/include/usbdiag_iface.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -63,13 +63,17 @@
 
 async_sess_t *usbdiag_connect(devman_handle_t);
-void usbdiag_disconnect(async_sess_t*);
+void usbdiag_disconnect(async_sess_t *);
 
-errno_t usbdiag_test_in(async_exch_t*, const usbdiag_test_params_t *, usbdiag_test_results_t *);
-errno_t usbdiag_test_out(async_exch_t*, const usbdiag_test_params_t *, usbdiag_test_results_t *);
+errno_t usbdiag_test_in(async_exch_t *,
+    const usbdiag_test_params_t *, usbdiag_test_results_t *);
+errno_t usbdiag_test_out(async_exch_t*,
+    const usbdiag_test_params_t *, usbdiag_test_results_t *);
 
 /** USB diagnostic device communication interface. */
 typedef struct {
-	errno_t (*test_in)(ddf_fun_t*, const usbdiag_test_params_t *, usbdiag_test_results_t *);
-	errno_t (*test_out)(ddf_fun_t*, const usbdiag_test_params_t *, usbdiag_test_results_t *);
+	errno_t (*test_in)(ddf_fun_t *,
+	    const usbdiag_test_params_t *, usbdiag_test_results_t *);
+	errno_t (*test_out)(ddf_fun_t*,
+	    const usbdiag_test_params_t *, usbdiag_test_results_t *);
 } usbdiag_iface_t;
 
Index: uspace/lib/usb/include/usb/classes/hub.h
===================================================================
--- uspace/lib/usb/include/usb/classes/hub.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usb/include/usb/classes/hub.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -178,5 +178,5 @@
 	 */
 	uint8_t max_current;
-} __attribute__ ((packed)) usb_hub_descriptor_header_t;
+} __attribute__((packed)) usb_hub_descriptor_header_t;
 
 /** One bit for the device and one bit for every port */
@@ -187,63 +187,55 @@
  */
 typedef enum {
-    /** This request resets a value reported in the hub status. */
-    USB_HUB_REQ_TYPE_CLEAR_HUB_FEATURE = 0x20,
-    /** This request resets a value reported in the port status. */
-    USB_HUB_REQ_TYPE_CLEAR_PORT_FEATURE = 0x23,
-    /**
-     * This is an optional per-port diagnostic request that returns the bus
-     * state value, as sampled at the last EOF2 point.
-     */
-    USB_HUB_REQ_TYPE_GET_STATE = 0xA3,
-    /** This request returns the hub descriptor. */
-    USB_HUB_REQ_TYPE_GET_DESCRIPTOR = 0xA0,
-    /**
-     * This request returns the current hub status and the states that have
-     * changed since the previous acknowledgment.
-     */
-    USB_HUB_REQ_TYPE_GET_HUB_STATUS = 0xA0,
-    /**
-     * This request returns the current port status and the current value of the
-     * port status change bits.
-     */
-    USB_HUB_REQ_TYPE_GET_PORT_STATUS = 0xA3,
-    /** This request overwrites the hub descriptor. */
-    USB_HUB_REQ_TYPE_SET_DESCRIPTOR = 0x20,
-    /** This request sets a value reported in the hub status. */
-    USB_HUB_REQ_TYPE_SET_HUB_FEATURE = 0x20,
-    /**
-     * This request sets the value that the hub uses to determine the index
-     * into the Route String Index for the hub.
-     */
-    USB_HUB_REQ_TYPE_SET_HUB_DEPTH = 0x20,
-    /** This request sets a value reported in the port status. */
-    USB_HUB_REQ_TYPE_SET_PORT_FEATURE = 0x23,
+	/** This request resets a value reported in the hub status. */
+	USB_HUB_REQ_TYPE_CLEAR_HUB_FEATURE = 0x20,
+	/** This request resets a value reported in the port status. */
+	USB_HUB_REQ_TYPE_CLEAR_PORT_FEATURE = 0x23,
+	/**
+	 * This is an optional per-port diagnostic request that returns the bus
+	 * state value, as sampled at the last EOF2 point.
+	 */
+	USB_HUB_REQ_TYPE_GET_STATE = 0xA3,
+	/** This request returns the hub descriptor. */
+	USB_HUB_REQ_TYPE_GET_DESCRIPTOR = 0xA0,
+	/**
+	 * This request returns the current hub status and the states that have
+	 * changed since the previous acknowledgment.
+	 */
+	USB_HUB_REQ_TYPE_GET_HUB_STATUS = 0xA0,
+	/**
+	 * This request returns the current port status and the current value of the
+	 * port status change bits.
+	 */
+	USB_HUB_REQ_TYPE_GET_PORT_STATUS = 0xA3,
+	/** This request overwrites the hub descriptor. */
+	USB_HUB_REQ_TYPE_SET_DESCRIPTOR = 0x20,
+	/** This request sets a value reported in the hub status. */
+	USB_HUB_REQ_TYPE_SET_HUB_FEATURE = 0x20,
+	/**
+	 * This request sets the value that the hub uses to determine the index
+	 * into the Route String Index for the hub.
+	 */
+	USB_HUB_REQ_TYPE_SET_HUB_DEPTH = 0x20,
+	/** This request sets a value reported in the port status. */
+	USB_HUB_REQ_TYPE_SET_PORT_FEATURE = 0x23,
 } usb_hub_bm_request_type_t;
 
-/** @brief hub class request codes*/
-/// \TODO these are duplicit to standart descriptors
+/**
+ * @brief hub class request codes
+ */
 typedef enum {
-    /**  */
-    USB_HUB_REQUEST_GET_STATUS = 0,
-    /** */
-    USB_HUB_REQUEST_CLEAR_FEATURE = 1,
-    /** USB 1.0 only */
-    USB_HUB_REQUEST_GET_STATE = 2,
-    /** */
-    USB_HUB_REQUEST_SET_FEATURE = 3,
-    /** */
-    USB_HUB_REQUEST_GET_DESCRIPTOR = 6,
-    /** */
-    USB_HUB_REQUEST_SET_DESCRIPTOR = 7,
-    /** */
-    USB_HUB_REQUEST_CLEAR_TT_BUFFER = 8,
-    /** */
-    USB_HUB_REQUEST_RESET_TT = 9,
-    /** */
-    USB_HUB_GET_TT_STATE = 10,
-    /** */
-    USB_HUB_STOP_TT = 11,
-    /** USB 3+ only */
-    USB_HUB_REQUEST_SET_HUB_DEPTH = 12,
+	USB_HUB_REQUEST_GET_STATUS = 0,
+	USB_HUB_REQUEST_CLEAR_FEATURE = 1,
+	/** USB 1.0 only */
+	USB_HUB_REQUEST_GET_STATE = 2,
+	USB_HUB_REQUEST_SET_FEATURE = 3,
+	USB_HUB_REQUEST_GET_DESCRIPTOR = 6,
+	USB_HUB_REQUEST_SET_DESCRIPTOR = 7,
+	USB_HUB_REQUEST_CLEAR_TT_BUFFER = 8,
+	USB_HUB_REQUEST_RESET_TT = 9,
+	USB_HUB_GET_TT_STATE = 10,
+	USB_HUB_STOP_TT = 11,
+	/** USB 3+ only */
+	USB_HUB_REQUEST_SET_HUB_DEPTH = 12,
 } usb_hub_request_t;
 
Index: uspace/lib/usb/include/usb/descriptor.h
===================================================================
--- uspace/lib/usb/include/usb/descriptor.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usb/include/usb/descriptor.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -101,5 +101,5 @@
 	/** Number of possible configurations. */
 	uint8_t configuration_count;
-} __attribute__ ((packed)) usb_standard_device_descriptor_t;
+} __attribute__((packed)) usb_standard_device_descriptor_t;
 
 /** USB device qualifier decriptor is basically a cut down version of the device
@@ -129,5 +129,5 @@
 	uint8_t configuration_count;
 	uint8_t reserved;
-} __attribute__ ((packed)) usb_standard_device_qualifier_descriptor_t;
+} __attribute__((packed)) usb_standard_device_qualifier_descriptor_t;
 
 /** Standard USB configuration descriptor.
@@ -156,5 +156,5 @@
 	 */
 	uint8_t max_power;
-} __attribute__ ((packed)) usb_standard_configuration_descriptor_t;
+} __attribute__((packed)) usb_standard_configuration_descriptor_t;
 
 /** USB Other Speed Configuration descriptor shows values that would change
@@ -191,5 +191,5 @@
 	/** String descriptor describing this interface. */
 	uint8_t str_interface;
-} __attribute__ ((packed)) usb_standard_interface_descriptor_t;
+} __attribute__((packed)) usb_standard_interface_descriptor_t;
 
 /** Standard USB endpoint descriptor.
@@ -223,5 +223,5 @@
 	 */
 	uint8_t poll_interval;
-} __attribute__ ((packed)) usb_standard_endpoint_descriptor_t;
+} __attribute__((packed)) usb_standard_endpoint_descriptor_t;
 
 /** Superspeed USB endpoint companion descriptor.
@@ -254,5 +254,5 @@
 	 */
 	uint16_t bytes_per_interval;
-} __attribute__ ((packed)) usb_superspeed_endpoint_companion_descriptor_t;
+} __attribute__((packed)) usb_superspeed_endpoint_companion_descriptor_t;
 
 /** Part of standard USB HID descriptor specifying one class descriptor.
@@ -265,5 +265,5 @@
 	/** Length of class-specific descriptor in bytes. */
 	uint16_t length;
-} __attribute__ ((packed)) usb_standard_hid_class_descriptor_info_t;
+} __attribute__((packed)) usb_standard_hid_class_descriptor_info_t;
 
 /** Standard USB HID descriptor.
@@ -296,5 +296,5 @@
 	/** First mandatory class descriptor (Report) info. */
 	usb_standard_hid_class_descriptor_info_t report_desc_info;
-} __attribute__ ((packed)) usb_standard_hid_descriptor_t;
+} __attribute__((packed)) usb_standard_hid_descriptor_t;
 
 #endif
Index: uspace/lib/usb/include/usb/port.h
===================================================================
--- uspace/lib/usb/include/usb/port.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usb/include/usb/port.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -90,5 +90,6 @@
 
 /* And these are to be called from the connected handler. */
-int usb_port_condvar_wait_timeout(usb_port_t *port, fibril_condvar_t *, suseconds_t);
+int usb_port_condvar_wait_timeout(usb_port_t *port,
+    fibril_condvar_t *, suseconds_t);
 
 /**
Index: uspace/lib/usb/include/usb/usb.h
===================================================================
--- uspace/lib/usb/include/usb/usb.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usb/include/usb/usb.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -54,6 +54,6 @@
 #define uint32_usb2host(n) uint32_t_le2host((n))
 
-const char * usb_str_transfer_type(usb_transfer_type_t t);
-const char * usb_str_transfer_type_short(usb_transfer_type_t t);
+const char *usb_str_transfer_type(usb_transfer_type_t);
+const char *usb_str_transfer_type_short(usb_transfer_type_t);
 
 const char *usb_str_direction(usb_direction_t);
@@ -149,6 +149,5 @@
 static inline bool usb_target_same(usb_target_t a, usb_target_t b)
 {
-	return (a.address == b.address)
-	    && (a.endpoint == b.endpoint);
+	return (a.address == b.address) && (a.endpoint == b.endpoint);
 }
 
@@ -167,12 +166,12 @@
 	USB_PID_SETUP = _MAKE_PID(3, 1),
 
-	USB_PID_DATA0 = _MAKE_PID(0 ,3),
-	USB_PID_DATA1 = _MAKE_PID(2 ,3),
+	USB_PID_DATA0 = _MAKE_PID(0, 3),
+	USB_PID_DATA1 = _MAKE_PID(2, 3),
 
-	USB_PID_ACK = _MAKE_PID(0 ,2),
-	USB_PID_NAK = _MAKE_PID(2 ,2),
-	USB_PID_STALL = _MAKE_PID(3 ,2),
+	USB_PID_ACK = _MAKE_PID(0, 2),
+	USB_PID_NAK = _MAKE_PID(2, 2),
+	USB_PID_STALL = _MAKE_PID(3, 2),
 
-	USB_PID_PRE = _MAKE_PID(3 ,0),
+	USB_PID_PRE = _MAKE_PID(3, 0),
 	/* USB_PID_ = _MAKE_PID( ,), */
 #undef _MAKE_PID
Index: uspace/lib/usbdev/include/usb/dev/device.h
===================================================================
--- uspace/lib/usbdev/include/usb/dev/device.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbdev/include/usb/dev/device.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -59,5 +59,6 @@
 
 /* DDF parts */
-errno_t usb_device_create_ddf(ddf_dev_t *, const usb_endpoint_description_t **, const char **);
+errno_t usb_device_create_ddf(ddf_dev_t *,
+    const usb_endpoint_description_t **, const char **);
 void usb_device_destroy_ddf(ddf_dev_t *);
 
@@ -68,11 +69,11 @@
 }
 
-usb_device_t * usb_device_create(devman_handle_t);
+usb_device_t *usb_device_create(devman_handle_t);
 void usb_device_destroy(usb_device_t *);
 
-const char * usb_device_get_name(usb_device_t *);
+const char *usb_device_get_name(usb_device_t *);
 ddf_fun_t *usb_device_ddf_fun_create(usb_device_t *, fun_type_t, const char *);
 
-async_exch_t * usb_device_bus_exchange_begin(usb_device_t *);
+async_exch_t *usb_device_bus_exchange_begin(usb_device_t *);
 void usb_device_bus_exchange_end(async_exch_t *);
 
@@ -95,11 +96,11 @@
 devman_handle_t usb_device_get_devman_handle(const usb_device_t *);
 
-const usb_device_descriptors_t * usb_device_descriptors(usb_device_t *);
+const usb_device_descriptors_t *usb_device_descriptors(usb_device_t *);
 
-const usb_alternate_interfaces_t * usb_device_get_alternative_ifaces(
+const usb_alternate_interfaces_t *usb_device_get_alternative_ifaces(
     usb_device_t *);
 
-void * usb_device_data_alloc(usb_device_t *, size_t);
-void * usb_device_data_get(usb_device_t *);
+void *usb_device_data_alloc(usb_device_t *, size_t);
+void *usb_device_data_get(usb_device_t *);
 
 #endif
Index: uspace/lib/usbdev/include/usb/dev/pipes.h
===================================================================
--- uspace/lib/usbdev/include/usb/dev/pipes.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbdev/include/usb/dev/pipes.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -92,5 +92,6 @@
 	const usb_standard_endpoint_descriptor_t *descriptor;
 	/** Relevant superspeed companion descriptor. */
-	const usb_superspeed_endpoint_companion_descriptor_t *companion_descriptor;
+	const usb_superspeed_endpoint_companion_descriptor_t
+	    *companion_descriptor;
 	/** Interface descriptor the endpoint belongs to. */
 	const usb_standard_interface_descriptor_t *interface;
@@ -105,5 +106,7 @@
     size_t, const uint8_t *, size_t, usb_dev_session_t *);
 
-errno_t usb_pipe_register(usb_pipe_t *, const usb_standard_endpoint_descriptor_t *, const usb_superspeed_endpoint_companion_descriptor_t *);
+errno_t usb_pipe_register(usb_pipe_t *,
+    const usb_standard_endpoint_descriptor_t *,
+    const usb_superspeed_endpoint_companion_descriptor_t *);
 errno_t usb_pipe_unregister(usb_pipe_t *);
 
Index: uspace/lib/usbdev/include/usb/dev/poll.h
===================================================================
--- uspace/lib/usbdev/include/usb/dev/poll.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbdev/include/usb/dev/poll.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -60,5 +60,8 @@
 	size_t request_size;
 
-	/** Data buffer of at least `request_size`. User is responsible for its allocation. */
+	/**
+	 * Data buffer of at least `request_size`. User is responsible for its
+	 * allocation.
+	 */
 	uint8_t *buffer;
 
@@ -75,6 +78,7 @@
 
 
-	/** Optional parameters - user can customize them, but they are defaulted to
-	 *  some reasonable values.
+	/**
+	 * Optional parameters - user can customize them, but they are
+	 * defaulted to  some reasonable values.
 	 */
 
@@ -86,5 +90,8 @@
 	int debug;
 
-	/** Maximum number of consecutive errors before polling termination (default 3). */
+	/**
+	 * Maximum number of consecutive errors before polling termination
+	 * (default 3).
+	 */
 	size_t max_failures;
 
@@ -121,6 +128,8 @@
 
 
-	/** Internal parameters - user is not expected to set them. Messing with them
-	 *  can result in unexpected behavior if you do not know what you are doing.
+	/**
+	 * Internal parameters - user is not expected to set them. Messing with
+	 * them can result in unexpected behavior if you do not know what you
+	 * are doing.
 	 */
 
Index: uspace/lib/usbdev/src/dp.c
===================================================================
--- uspace/lib/usbdev/src/dp.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbdev/src/dp.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -127,5 +127,6 @@
  * @retval -1 Invalid input.
  */
-static int get_descriptor_type(const usb_dp_parser_data_t *data, const uint8_t *start)
+static int get_descriptor_type(const usb_dp_parser_data_t *data,
+    const uint8_t *start)
 {
 	if (start == NULL) {
@@ -258,5 +259,6 @@
 	int parent_type = get_descriptor_type(data, parent);
 	int possible_sibling_type = get_descriptor_type(data, possible_sibling);
-	if (is_nested_descriptor_type(parser, possible_sibling_type, parent_type)) {
+	if (is_nested_descriptor_type(parser,
+		    possible_sibling_type, parent_type)) {
 		return possible_sibling;
 	} else {
Index: uspace/lib/usbdev/src/pipes.c
===================================================================
--- uspace/lib/usbdev/src/pipes.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbdev/src/pipes.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -338,5 +338,5 @@
  * @return Error code.
  */
-errno_t usb_pipe_write_dma(usb_pipe_t *pipe, void *base, void* ptr,  size_t size)
+errno_t usb_pipe_write_dma(usb_pipe_t *pipe, void *base, void *ptr, size_t size)
 {
 	assert(pipe);
@@ -377,5 +377,6 @@
 /** Initialize USB default control pipe.
  *
- * This one is special because it must not be registered, it is registered automatically.
+ * This one is special because it must not be registered, it is registered
+ * automatically.
  *
  * @param pipe Endpoint pipe to be initialized.
@@ -383,5 +384,6 @@
  * @return Error code.
  */
-errno_t usb_pipe_initialize_default_control(usb_pipe_t *pipe, usb_dev_session_t *bus_session)
+errno_t usb_pipe_initialize_default_control(usb_pipe_t *pipe,
+    usb_dev_session_t *bus_session)
 {
 	const errno_t ret = usb_pipe_initialize(pipe, bus_session);
@@ -402,5 +404,7 @@
  * @return Error code.
  */
-errno_t usb_pipe_register(usb_pipe_t *pipe, const usb_standard_endpoint_descriptor_t *ep_desc, const usb_superspeed_endpoint_companion_descriptor_t *comp_desc)
+errno_t usb_pipe_register(usb_pipe_t *pipe,
+    const usb_standard_endpoint_descriptor_t *ep_desc,
+    const usb_superspeed_endpoint_companion_descriptor_t *comp_desc)
 {
 	assert(pipe);
@@ -429,5 +433,6 @@
 #undef COPY
 
-	const errno_t ret = usbhc_register_endpoint(exch, &pipe->desc, &descriptors);
+	const errno_t ret = usbhc_register_endpoint(exch,
+	    &pipe->desc, &descriptors);
 	async_exchange_end(exch);
 	return ret;
Index: uspace/lib/usbhid/src/hidparser.c
===================================================================
--- uspace/lib/usbhid/src/hidparser.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbhid/src/hidparser.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -52,6 +52,6 @@
 int usb_hid_translate_data(usb_hid_report_field_t *item, const uint8_t *data);
 
-uint32_t usb_hid_translate_data_reverse(usb_hid_report_field_t *item, 
-	int32_t value);
+uint32_t usb_hid_translate_data_reverse(usb_hid_report_field_t *item,
+    int32_t value);
 
 
@@ -76,9 +76,9 @@
  *
  * @param parser Opaque report parser structure
- * @param report_id 
+ * @param report_id
  * @param type
  * @return Number of items in specified report
  */
-size_t usb_hid_report_size(usb_hid_report_t *report, uint8_t report_id, 
+size_t usb_hid_report_size(usb_hid_report_t *report, uint8_t report_id,
     usb_hid_report_type_t type)
 {
@@ -100,9 +100,9 @@
  *
  * @param parser Opaque report parser structure
- * @param report_id 
+ * @param report_id
  * @param type
  * @return Number of items in specified report
  */
-size_t usb_hid_report_byte_size(usb_hid_report_t *report, uint8_t report_id, 
+size_t usb_hid_report_byte_size(usb_hid_report_t *report, uint8_t report_id,
     usb_hid_report_type_t type)
 {
@@ -117,5 +117,5 @@
 		return 0;
 	} else {
-		return ((report_des->bit_length + 7) / 8) ;
+		return ((report_des->bit_length + 7) / 8);
 	}
 }
@@ -129,11 +129,11 @@
  * @param data Data for the report.
  * @return Error code.
- */ 
-errno_t usb_hid_parse_report(const usb_hid_report_t *report, const uint8_t *data, 
+ */
+errno_t usb_hid_parse_report(const usb_hid_report_t *report, const uint8_t *data,
     size_t size, uint8_t *report_id)
 {
 	usb_hid_report_description_t *report_des;
 	usb_hid_report_type_t type = USB_HID_REPORT_TYPE_INPUT;
-	
+
 	if (report == NULL) {
 		return EINVAL;
@@ -146,5 +146,5 @@
 	}
 
-	report_des = usb_hid_report_find_description(report, *report_id, 
+	report_des = usb_hid_report_find_description(report, *report_id,
 	    type);
 
@@ -158,15 +158,15 @@
 
 		if (USB_HID_ITEM_FLAG_CONSTANT(item->item_flags) == 0) {
-			
+
 			if (USB_HID_ITEM_FLAG_VARIABLE(item->item_flags) == 0) {
 				/* array */
-				item->value = 
-					usb_hid_translate_data(item, data);
-				
+				item->value =
+				    usb_hid_translate_data(item, data);
+
 				item->usage = USB_HID_EXTENDED_USAGE(
 				    item->usages[item->value -
 				    item->physical_minimum]);
 
-				item->usage_page = 
+				item->usage_page =
 				    USB_HID_EXTENDED_USAGE_PAGE(
 				    item->usages[item->value -
@@ -174,19 +174,19 @@
 
 				usb_hid_report_set_last_item(
-				    item->collection_path, 
-				    USB_HID_TAG_CLASS_GLOBAL, 
+				    item->collection_path,
+				    USB_HID_TAG_CLASS_GLOBAL,
 				    item->usage_page);
 
 				usb_hid_report_set_last_item(
-				    item->collection_path, 
+				    item->collection_path,
 				    USB_HID_TAG_CLASS_LOCAL, item->usage);
 			} else {
 				/* variable item */
-				item->value = usb_hid_translate_data(item, 
+				item->value = usb_hid_translate_data(item,
 				    data);
 			}
 		}
 	}
-	
+
 	return EOK;
 }
@@ -214,9 +214,9 @@
 	int resolution;
 	if (item->physical_maximum == item->physical_minimum) {
-	    resolution = 1;
-	} else {
-	    resolution = (item->logical_maximum - item->logical_minimum) /
-		((item->physical_maximum - item->physical_minimum) *
-		(usb_pow(10, (item->unit_exponent))));
+		resolution = 1;
+	} else {
+		resolution = (item->logical_maximum - item->logical_minimum) /
+		    ((item->physical_maximum - item->physical_minimum) *
+		    (usb_pow(10, (item->unit_exponent))));
 	}
 
@@ -255,5 +255,5 @@
 	}
 
-	return (int) (((value - item->logical_minimum) / resolution) + 
+	return (int) (((value - item->logical_minimum) / resolution) +
 	    item->physical_minimum);
 }
@@ -262,5 +262,5 @@
 /* OUTPUT API */
 
-/** 
+/**
  * Allocates output report buffer for output report
  *
@@ -270,5 +270,5 @@
  * @return Returns allocated output buffer for specified output
  */
-uint8_t *usb_hid_report_output(usb_hid_report_t *report, size_t *size, 
+uint8_t *usb_hid_report_output(usb_hid_report_t *report, size_t *size,
     uint8_t report_id)
 {
@@ -322,5 +322,5 @@
  * @return Error code
  */
-errno_t usb_hid_report_output_translate(usb_hid_report_t *report, 
+errno_t usb_hid_report_output_translate(usb_hid_report_t *report,
     uint8_t report_id, uint8_t *buffer, size_t size)
 {
@@ -329,5 +329,5 @@
 	int length;
 	int32_t tmp_value;
-	
+
 	if (report == NULL) {
 		return EINVAL;
@@ -339,7 +339,7 @@
 
 	usb_hid_report_description_t *report_des;
-	report_des = usb_hid_report_find_description(report, report_id, 
+	report_des = usb_hid_report_find_description(report, report_id,
 	    USB_HID_REPORT_TYPE_OUTPUT);
-	
+
 	if (report_des == NULL) {
 		return EINVAL;
@@ -348,14 +348,14 @@
 	list_foreach(report_des->report_items, ritems_link,
 	    usb_hid_report_field_t, report_item) {
-		value = usb_hid_translate_data_reverse(report_item, 
+		value = usb_hid_translate_data_reverse(report_item,
 		    report_item->value);
 
 		offset = report_des->bit_length - report_item->offset - 1;
 		length = report_item->size;
-		
+
 		usb_log_debug("\ttranslated value: %x", value);
 
 		if ((offset / 8) == ((offset + length - 1) / 8)) {
-			if (((size_t) (offset / 8) >= size) || 
+			if (((size_t) (offset / 8) >= size) ||
 			    ((size_t) (offset + length - 1) / 8) >= size) {
 				break; // TODO ErrorCode
@@ -364,5 +364,5 @@
 			value = value << shift;
 			value = value & (((1 << length) - 1) << shift);
-			
+
 			uint8_t mask = 0;
 			mask = 0xff - (((1 << length) - 1) << shift);
@@ -376,23 +376,23 @@
 				if (i == (offset / 8)) {
 					tmp_value = value;
-					tmp_value = tmp_value & 
+					tmp_value = tmp_value &
 					    ((1 << (8 - (offset % 8))) - 1);
 
 					tmp_value = tmp_value << (offset % 8);
-					
+
 					mask = ~(((1 << (8 - (offset % 8))) - 1)
 					    << (offset % 8));
 
-					buffer[i] = (buffer[i] & mask) | 
+					buffer[i] = (buffer[i] & mask) |
 					    tmp_value;
 				} else if (i == ((offset + length - 1) / 8)) {
-					
-					value = value >> (length - 
+
+					value = value >> (length -
 					    ((offset + length) % 8));
 
-					value = value & ((1 << (length - 
+					value = value & ((1 << (length -
 					    ((offset + length) % 8))) - 1);
-					
-					mask = (1 << (length - 
+
+					mask = (1 << (length -
 					    ((offset + length) % 8))) - 1;
 
@@ -407,5 +407,5 @@
 		report_item->value = 0;
 	}
-	
+
 	return EOK;
 }
@@ -418,5 +418,5 @@
  * @return ranslated value
  */
-uint32_t usb_hid_translate_data_reverse(usb_hid_report_field_t *item, 
+uint32_t usb_hid_translate_data_reverse(usb_hid_report_field_t *item,
     int value)
 {
@@ -430,23 +430,23 @@
 	if ((item->physical_minimum == 0) && (item->physical_maximum == 0)) {
 		item->physical_minimum = item->logical_minimum;
-		item->physical_maximum = item->logical_maximum;			
-	}
-	
+		item->physical_maximum = item->logical_maximum;
+	}
+
 	/* variable item */
 	if (item->physical_maximum == item->physical_minimum) {
-	    resolution = 1;
-	} else {
-	    resolution = (item->logical_maximum - item->logical_minimum) /
-		((item->physical_maximum - item->physical_minimum) *
-		(usb_pow(10, (item->unit_exponent))));
-	}
-
-	ret = ((value - item->physical_minimum) * resolution) + 
+		resolution = 1;
+	} else {
+		resolution = (item->logical_maximum - item->logical_minimum) /
+		    ((item->physical_maximum - item->physical_minimum) *
+		    (usb_pow(10, (item->unit_exponent))));
+	}
+
+	ret = ((value - item->physical_minimum) * resolution) +
 	    item->logical_minimum;
 
 	usb_log_debug("\tvalue(%x), resolution(%x), phymin(%x) logmin(%x), "
-	    "ret(%x)\n", value, resolution, item->physical_minimum, 
+	    "ret(%x)\n", value, resolution, item->physical_minimum,
 	    item->logical_minimum, ret);
-	
+
 	if ((item->logical_minimum < 0) || (item->logical_maximum < 0)) {
 		return USB_HID_INT32_TO_UINT32(ret, item->size);
@@ -467,8 +467,8 @@
 {
 	usb_hid_report_item_t *new_report_item;
-	
+
 	if (!(new_report_item = malloc(sizeof(usb_hid_report_item_t)))) {
 		return NULL;
-	}					
+	}
 	memcpy(new_report_item,item, sizeof(usb_hid_report_item_t));
 	link_initialize(&(new_report_item->link));
@@ -485,5 +485,5 @@
  * @param field Current field. If NULL is given, the first one in the report
  * is returned. Otherwise the next one i nthe list is returned.
- * @param path Usage path specifying which fields wa are interested in. 
+ * @param path Usage path specifying which fields wa are interested in.
  * @param flags Flags defining mode of usage paths comparison
  * @param type Type of report we search.
@@ -491,13 +491,13 @@
  * @retval Pointer to the founded report structure when founded
  */
-usb_hid_report_field_t *usb_hid_report_get_sibling(usb_hid_report_t *report, 
-    usb_hid_report_field_t *field, usb_hid_report_path_t *path, int flags, 
+usb_hid_report_field_t *usb_hid_report_get_sibling(usb_hid_report_t *report,
+    usb_hid_report_field_t *field, usb_hid_report_path_t *path, int flags,
     usb_hid_report_type_t type)
 {
-	usb_hid_report_description_t *report_des = 
+	usb_hid_report_description_t *report_des =
 	    usb_hid_report_find_description(report, path->report_id, type);
 
 	link_t *field_it;
-	
+
 	if (report_des == NULL) {
 		return NULL;
@@ -511,5 +511,5 @@
 
 	while (field_it != &report_des->report_items.head) {
-		field = list_get_instance(field_it, usb_hid_report_field_t, 
+		field = list_get_instance(field_it, usb_hid_report_field_t,
 		    ritems_link);
 
@@ -553,7 +553,7 @@
 	usb_hid_report_description_t *report_des;
 	link_t *report_it;
-	
+
 	if (report_id > 0) {
-		report_des = usb_hid_report_find_description(report, report_id, 
+		report_des = usb_hid_report_find_description(report, report_id,
 		    type);
 		if (report_des == NULL) {
@@ -561,5 +561,5 @@
 		} else {
 			report_it = report_des->reports_link.next;
-		}	
+		}
 	} else {
 		report_it = report->reports.head.next;
@@ -567,5 +567,5 @@
 
 	while (report_it != &report->reports.head) {
-		report_des = list_get_instance(report_it, 
+		report_des = list_get_instance(report_it,
 		    usb_hid_report_description_t, reports_link);
 
@@ -594,8 +594,8 @@
 		return;
 	}
-	
+
 	report_item->usages_count = 0;
 	memset(report_item->usages, 0, USB_HID_MAX_USAGES);
-	
+
 	report_item->extended_usage_page = 0;
 	report_item->usage_minimum = 0;
Index: uspace/lib/usbhid/src/hidpath.c
===================================================================
--- uspace/lib/usbhid/src/hidpath.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbhid/src/hidpath.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -73,9 +73,9 @@
  * @return Error code
  */
-errno_t usb_hid_report_path_append_item(usb_hid_report_path_t *usage_path, 
-                                    int32_t usage_page, int32_t usage)
-{	
-	usb_hid_report_usage_path_t *item
-		= malloc(sizeof(usb_hid_report_usage_path_t));
+errno_t usb_hid_report_path_append_item(usb_hid_report_path_t *usage_path,
+    int32_t usage_page, int32_t usage)
+{
+	usb_hid_report_usage_path_t *item =
+	    malloc(sizeof(usb_hid_report_usage_path_t));
 
 	if (item == NULL) {
@@ -87,5 +87,5 @@
 	item->usage_page = usage_page;
 	item->flags = 0;
-	
+
 	list_append (&item->rpath_items_link, &usage_path->items);
 	usage_path->depth++;
@@ -96,5 +96,5 @@
 /**
  * Removes last item from the usage path structure
- * @param usage_path 
+ * @param usage_path
  * @return void
  */
@@ -103,6 +103,6 @@
 	link_t *item_link;
 	usb_hid_report_usage_path_t *item;
-	
-	if(!list_empty(&usage_path->items)){
+
+	if (!list_empty(&usage_path->items)) {
 		item_link = list_last(&usage_path->items);
 		item = list_get_instance(item_link,
@@ -124,8 +124,8 @@
 {
 	usb_hid_report_usage_path_t *item;
-	
-	if(!list_empty(&usage_path->items)){
+
+	if (!list_empty(&usage_path->items)) {
 		item = list_get_instance(list_last(&usage_path->items),
-			usb_hid_report_usage_path_t, rpath_items_link);
+		    usb_hid_report_usage_path_t, rpath_items_link);
 
 		memset(item, 0, sizeof(usb_hid_report_usage_path_t));
@@ -143,32 +143,24 @@
  * @return void
  */
-void usb_hid_report_set_last_item(usb_hid_report_path_t *usage_path, 
-                                  int32_t tag, int32_t data)
+void usb_hid_report_set_last_item(usb_hid_report_path_t *usage_path,
+    int32_t tag, int32_t data)
 {
 	usb_hid_report_usage_path_t *item;
-	
-	if(!list_empty(&usage_path->items)){
+
+	if (!list_empty(&usage_path->items)) {
 		item = list_get_instance(list_last(&usage_path->items),
 		     usb_hid_report_usage_path_t, rpath_items_link);
 
-		switch(tag) {
-			case USB_HID_TAG_CLASS_GLOBAL:
-				item->usage_page = data;
-				break;
-			case USB_HID_TAG_CLASS_LOCAL:
-				item->usage = data;
-				break;
-		}
-	}
-	
-}
-
-
-/**
- *
- *
- *
- *
- */
+		switch (tag) {
+		case USB_HID_TAG_CLASS_GLOBAL:
+			item->usage_page = data;
+			break;
+		case USB_HID_TAG_CLASS_LOCAL:
+			item->usage = data;
+			break;
+		}
+	}
+}
+
 void usb_hid_print_usage_path(usb_hid_report_path_t *path)
 {
@@ -199,10 +191,10 @@
 	usb_hid_report_usage_path_t *report_item;
 	usb_hid_report_usage_path_t *path_item;
-	
+
 	link_t *report_link;
 	link_t *path_link;
-	
+
 	int only_page;
-	
+
 	if (report_path->report_id != path->report_id) {
 		if (path->report_id != 0) {
@@ -210,14 +202,14 @@
 		}
 	}
-	
+
 	// Empty path match all others
 	if (path->depth == 0) {
 		return 0;
 	}
-	
+
 	if ((only_page = flags & USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY) != 0) {
 		flags -= USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY;
 	}
-	
+
 	switch (flags) {
 	/* Path is somewhere in report_path */
@@ -226,14 +218,14 @@
 			return 1;
 		}
-		
+
 		path_link = list_first(&path->items);
 		path_item = list_get_instance(path_link,
 		    usb_hid_report_usage_path_t, rpath_items_link);
-		
+
 		list_foreach(report_path->items, rpath_items_link,
 		    usb_hid_report_usage_path_t, report_item) {
 			if (USB_HID_SAME_USAGE_PAGE(report_item->usage_page,
 			    path_item->usage_page)) {
-				
+
 				if (only_page == 0) {
 					if (USB_HID_SAME_USAGE(report_item->usage,
@@ -245,8 +237,8 @@
 			}
 		}
-		
+
 		return 1;
 		break;
-	
+
 	/* The paths must be identical */
 	case USB_HID_PATH_COMPARE_STRICT:
@@ -255,19 +247,19 @@
 		}
 		/* Fallthrough */
-	
+
 	/* Path is prefix of the report_path */
 	case USB_HID_PATH_COMPARE_BEGIN:
 		report_link = report_path->items.head.next;
 		path_link = path->items.head.next;
-		
+
 		while ((report_link != &report_path->items.head) &&
 		    (path_link != &path->items.head)) {
-			
+
 			report_item = list_get_instance(report_link,
 			    usb_hid_report_usage_path_t, rpath_items_link);
-			
+
 			path_item = list_get_instance(path_link,
 			    usb_hid_report_usage_path_t, rpath_items_link);
-			
+
 			if (!USB_HID_SAME_USAGE_PAGE(report_item->usage_page,
 			    path_item->usage_page) || ((only_page == 0) &&
@@ -280,5 +272,5 @@
 			}
 		}
-		
+
 		if ((((flags & USB_HID_PATH_COMPARE_BEGIN) != 0) &&
 		    (path_link == &path->items.head)) ||
@@ -290,22 +282,22 @@
 		}
 		break;
-	
+
 	/* Path is suffix of report_path */
 	case USB_HID_PATH_COMPARE_END:
 		report_link = report_path->items.head.prev;
 		path_link = path->items.head.prev;
-		
+
 		if (list_empty(&path->items)) {
 			return 0;
 		}
-		
+
 		while ((report_link != &report_path->items.head) &&
 		      (path_link != &path->items.head)) {
 			report_item = list_get_instance(report_link,
 			    usb_hid_report_usage_path_t, rpath_items_link);
-			
+
 			path_item = list_get_instance(path_link,
 			    usb_hid_report_usage_path_t, rpath_items_link);
-			
+
 			if (!USB_HID_SAME_USAGE_PAGE(report_item->usage_page,
 			    path_item->usage_page) || ((only_page == 0) &&
@@ -318,5 +310,5 @@
 			}
 		}
-		
+
 		if (path_link == &path->items.head) {
 			return 0;
@@ -325,5 +317,5 @@
 		}
 		break;
-	
+
 	default:
 		return -1;
@@ -340,5 +332,5 @@
 	usb_hid_report_path_t *path;
 	path = malloc(sizeof(usb_hid_report_path_t));
-	if(path == NULL){
+	if (path == NULL) {
 		return NULL;
 	}
@@ -363,5 +355,5 @@
 	if (path == NULL)
 		return;
-	while(!list_empty(&path->items)){
+	while (!list_empty(&path->items)) {
 		usb_hid_report_remove_last_item(path);
 	}
@@ -379,16 +371,16 @@
  */
 usb_hid_report_path_t *usb_hid_report_path_clone(
-	usb_hid_report_path_t *usage_path)
+    usb_hid_report_path_t *usage_path)
 {
 	usb_hid_report_usage_path_t *new_path_item;
 	usb_hid_report_path_t *new_usage_path = usb_hid_report_path ();
 
-	if(new_usage_path == NULL){
+	if (new_usage_path == NULL) {
 		return NULL;
 	}
 
 	new_usage_path->report_id = usage_path->report_id;
-	
-	if(list_empty(&usage_path->items)){
+
+	if (list_empty(&usage_path->items)) {
 		return new_usage_path;
 	}
@@ -398,13 +390,13 @@
 
 		new_path_item = malloc(sizeof(usb_hid_report_usage_path_t));
-		if(new_path_item == NULL) {
+		if (new_path_item == NULL) {
 			return NULL;
 		}
-		
+
 		link_initialize(&new_path_item->rpath_items_link);
 		new_path_item->usage_page = path_item->usage_page;
-		new_path_item->usage = path_item->usage;		
-		new_path_item->flags = path_item->flags;		
-		
+		new_path_item->usage = path_item->usage;
+		new_path_item->flags = path_item->flags;
+
 		list_append(&new_path_item->rpath_items_link,
 		    &new_usage_path->items);
@@ -423,8 +415,8 @@
  * @return Error code
  */
-errno_t usb_hid_report_path_set_report_id(usb_hid_report_path_t *path, 
-	uint8_t report_id)
-{
-	if(path == NULL){
+errno_t usb_hid_report_path_set_report_id(usb_hid_report_path_t *path,
+    uint8_t report_id)
+{
+	if (path == NULL) {
 		return EINVAL;
 	}
Index: uspace/lib/usbhid/src/hidreport.c
===================================================================
--- uspace/lib/usbhid/src/hidreport.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbhid/src/hidreport.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -71,5 +71,5 @@
 	const uint8_t *d =
 	    usb_dp_get_nested_descriptor(&parser, &parser_data,
-	        usb_device_descriptors(dev)->full_config);
+	    usb_device_descriptors(dev)->full_config);
 	
 	/*
@@ -163,5 +163,5 @@
 
 
-errno_t usb_hid_process_report_descriptor(usb_device_t *dev, 
+errno_t usb_hid_process_report_descriptor(usb_device_t *dev,
     usb_hid_report_t *report, uint8_t **report_desc, size_t *report_size)
 {
Index: uspace/lib/usbhid/src/hidreq.c
===================================================================
--- uspace/lib/usbhid/src/hidreq.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbhid/src/hidreq.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -65,23 +65,23 @@
 		return EINVAL;
 	}
-	
-	if (iface_no < 0) {
-		usb_log_warning("usbhid_req_set_report(): no interface given."
-		    "\n");
-		return EINVAL;
-	}
-	
-	/*
-	 * No need for checking other parameters, as they are checked in
-	 * the called function (usb_control_request_set()).
-	 */
-	
-	errno_t rc;
-	
+
+	if (iface_no < 0) {
+		usb_log_warning("usbhid_req_set_report(): no interface given."
+		    "\n");
+		return EINVAL;
+	}
+
+	/*
+	 * No need for checking other parameters, as they are checked in
+	 * the called function (usb_control_request_set()).
+	 */
+
+	errno_t rc;
+
 	uint16_t value = 0;
 	value |= (type << 8);
 
 	usb_log_debug("Sending Set Report request to the device.");
-	
+
 	rc = usb_control_request_set(ctrl_pipe,
 	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE,
@@ -93,5 +93,5 @@
 		return rc;
 	}
-	
+
 	return EOK;
 }
@@ -115,23 +115,23 @@
 		return EINVAL;
 	}
-	
-	if (iface_no < 0) {
-		usb_log_warning("usbhid_req_set_report(): no interface given."
-		    "\n");
-		return EINVAL;
-	}
-	
-	/*
-	 * No need for checking other parameters, as they are checked in
-	 * the called function (usb_control_request_set()).
-	 */
-	
+
+	if (iface_no < 0) {
+		usb_log_warning("usbhid_req_set_report(): no interface given."
+		    "\n");
+		return EINVAL;
+	}
+
+	/*
+	 * No need for checking other parameters, as they are checked in
+	 * the called function (usb_control_request_set()).
+	 */
+
 	errno_t rc;
 
 	usb_log_debug("Sending Set Protocol request to the device ("
 	    "protocol: %d, iface: %d).\n", protocol, iface_no);
-	
-	rc = usb_control_request_set(ctrl_pipe, 
-	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE, 
+
+	rc = usb_control_request_set(ctrl_pipe,
+	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE,
 	    USB_HIDREQ_SET_PROTOCOL, protocol, iface_no, NULL, 0);
 
@@ -141,5 +141,5 @@
 		return rc;
 	}
-	
+
 	return EOK;
 }
@@ -163,23 +163,23 @@
 		return EINVAL;
 	}
-	
-	if (iface_no < 0) {
-		usb_log_warning("usbhid_req_set_report(): no interface given."
-		    "\n");
-		return EINVAL;
-	}
-	
-	/*
-	 * No need for checking other parameters, as they are checked in
-	 * the called function (usb_control_request_set()).
-	 */
-	
+
+	if (iface_no < 0) {
+		usb_log_warning("usbhid_req_set_report(): no interface given."
+		    "\n");
+		return EINVAL;
+	}
+
+	/*
+	 * No need for checking other parameters, as they are checked in
+	 * the called function (usb_control_request_set()).
+	 */
+
 	errno_t rc;
 
 	usb_log_debug("Sending Set Idle request to the device ("
 	    "duration: %u, iface: %d).\n", duration, iface_no);
-	
+
 	uint16_t value = duration << 8;
-	
+
 	rc = usb_control_request_set(ctrl_pipe,
 	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE,
@@ -191,5 +191,5 @@
 		return rc;
 	}
-	
+
 	return EOK;
 }
@@ -203,5 +203,5 @@
  * @param[in][out] buffer Buffer for the report data.
  * @param[in] buf_size Size of the buffer (in bytes).
- * @param[out] actual_size Actual size of report received from the device 
+ * @param[out] actual_size Actual size of report received from the device
  *                         (in bytes).
  *
@@ -210,6 +210,6 @@
  * @return Other value inherited from function usb_control_request_set().
  */
-errno_t usbhid_req_get_report(usb_pipe_t *ctrl_pipe, int iface_no, 
-    usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size, 
+errno_t usbhid_req_get_report(usb_pipe_t *ctrl_pipe, int iface_no,
+    usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size,
     size_t *actual_size)
 {
@@ -218,25 +218,25 @@
 		return EINVAL;
 	}
-	
-	if (iface_no < 0) {
-		usb_log_warning("usbhid_req_set_report(): no interface given."
-		    "\n");
-		return EINVAL;
-	}
-	
-	/*
-	 * No need for checking other parameters, as they are checked in
-	 * the called function (usb_control_request_set()).
-	 */
-	
+
+	if (iface_no < 0) {
+		usb_log_warning("usbhid_req_set_report(): no interface given."
+		    "\n");
+		return EINVAL;
+	}
+
+	/*
+	 * No need for checking other parameters, as they are checked in
+	 * the called function (usb_control_request_set()).
+	 */
+
 	errno_t rc;
 
 	uint16_t value = 0;
 	value |= (type << 8);
-	
+
 	usb_log_debug("Sending Get Report request to the device.");
-	
-	rc = usb_control_request_get(ctrl_pipe, 
-	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE, 
+
+	rc = usb_control_request_get(ctrl_pipe,
+	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE,
 	    USB_HIDREQ_GET_REPORT, value, iface_no, buffer, buf_size,
 	    actual_size);
@@ -247,5 +247,5 @@
 		return rc;
 	}
-	
+
 	return EOK;
 }
@@ -262,5 +262,5 @@
  * @return Other value inherited from function usb_control_request_set().
  */
-errno_t usbhid_req_get_protocol(usb_pipe_t *ctrl_pipe, int iface_no, 
+errno_t usbhid_req_get_protocol(usb_pipe_t *ctrl_pipe, int iface_no,
     usb_hid_protocol_t *protocol)
 {
@@ -269,26 +269,26 @@
 		return EINVAL;
 	}
-	
-	if (iface_no < 0) {
-		usb_log_warning("usbhid_req_set_report(): no interface given."
-		    "\n");
-		return EINVAL;
-	}
-	
-	/*
-	 * No need for checking other parameters, as they are checked in
-	 * the called function (usb_control_request_set()).
-	 */
-	
-	errno_t rc;	
+
+	if (iface_no < 0) {
+		usb_log_warning("usbhid_req_set_report(): no interface given."
+		    "\n");
+		return EINVAL;
+	}
+
+	/*
+	 * No need for checking other parameters, as they are checked in
+	 * the called function (usb_control_request_set()).
+	 */
+
+	errno_t rc;
 
 	usb_log_debug("Sending Get Protocol request to the device ("
 	    "iface: %d).\n", iface_no);
-	
+
 	uint8_t buffer[1];
 	size_t actual_size = 0;
-	
-	rc = usb_control_request_get(ctrl_pipe, 
-	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE, 
+
+	rc = usb_control_request_get(ctrl_pipe,
+	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE,
 	    USB_HIDREQ_GET_PROTOCOL, 0, iface_no, buffer, 1, &actual_size);
 
@@ -298,13 +298,13 @@
 		return rc;
 	}
-	
+
 	if (actual_size != 1) {
 		usb_log_warning("Wrong data size: %zu, expected: 1.",
-			actual_size);
+		    actual_size);
 		return ELIMIT;
 	}
-	
+
 	*protocol = buffer[0];
-	
+
 	return EOK;
 }
@@ -320,38 +320,39 @@
  * @retval EOK if successful.
  * @retval EINVAL if no HID device is given.
- * @return Other value inherited from one of functions 
+ * @return Other value inherited from one of functions
  *         usb_pipe_start_session(), usb_pipe_end_session(),
  *         usb_control_request_set().
  */
-errno_t usbhid_req_get_idle(usb_pipe_t *ctrl_pipe, int iface_no, uint8_t *duration)
-{
-	if (ctrl_pipe == NULL) {
-		usb_log_warning("usbhid_req_set_report(): no pipe given.");
-		return EINVAL;
-	}
-	
-	if (iface_no < 0) {
-		usb_log_warning("usbhid_req_set_report(): no interface given."
-		    "\n");
-		return EINVAL;
-	}
-	
-	/*
-	 * No need for checking other parameters, as they are checked in
-	 * the called function (usb_control_request_set()).
-	 */
-	
+errno_t usbhid_req_get_idle(usb_pipe_t *ctrl_pipe, int iface_no,
+    uint8_t *duration)
+{
+	if (ctrl_pipe == NULL) {
+		usb_log_warning("usbhid_req_set_report(): no pipe given.");
+		return EINVAL;
+	}
+
+	if (iface_no < 0) {
+		usb_log_warning("usbhid_req_set_report(): no interface given."
+		    "\n");
+		return EINVAL;
+	}
+
+	/*
+	 * No need for checking other parameters, as they are checked in
+	 * the called function (usb_control_request_set()).
+	 */
+
 	errno_t rc;
 
 	usb_log_debug("Sending Get Idle request to the device ("
 	    "iface: %d).\n", iface_no);
-	
+
 	uint16_t value = 0;
 	uint8_t buffer[1];
 	size_t actual_size = 0;
-	
-	rc = usb_control_request_get(ctrl_pipe, 
-	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE, 
-	    USB_HIDREQ_GET_IDLE, value, iface_no, buffer, 1, 
+
+	rc = usb_control_request_get(ctrl_pipe,
+	    USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE,
+	    USB_HIDREQ_GET_IDLE, value, iface_no, buffer, 1,
 	    &actual_size);
 
@@ -361,13 +362,13 @@
 		return rc;
 	}
-	
+
 	if (actual_size != 1) {
 		usb_log_warning("Wrong data size: %zu, expected: 1.",
-			actual_size);
+		    actual_size);
 		return ELIMIT;
 	}
-	
+
 	*duration = buffer[0];
-	
+
 	return EOK;
 }
Index: uspace/lib/usbhost/include/usb/host/bus.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/bus.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbhost/include/usb/host/bus.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -111,5 +111,6 @@
 	int (*device_online)(device_t *);			/**< Optional */
 	void (*device_offline)(device_t *);			/**< Optional */
-	endpoint_t *(*endpoint_create)(device_t *, const usb_endpoint_descriptors_t *);
+	endpoint_t *(*endpoint_create)(device_t *,
+	    const usb_endpoint_descriptors_t *);
 
 	/* Operations on endpoint */
Index: uspace/lib/usbhost/include/usb/host/endpoint.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/endpoint.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbhost/include/usb/host/endpoint.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -102,6 +102,8 @@
 
 	/* Policies for transfer buffers */
-	dma_policy_t transfer_buffer_policy;		/**< A hint for optimal performance. */
-	dma_policy_t required_transfer_buffer_policy;	/**< Enforced by the library. */
+	/** A hint for optimal performance. */
+	dma_policy_t transfer_buffer_policy;
+	/** Enforced by the library. */
+	dma_policy_t required_transfer_buffer_policy;
 
 	/**
@@ -114,5 +116,6 @@
 } endpoint_t;
 
-extern void endpoint_init(endpoint_t *, device_t *, const usb_endpoint_descriptors_t *);
+extern void endpoint_init(endpoint_t *, device_t *,
+    const usb_endpoint_descriptors_t *);
 
 extern void endpoint_add_ref(endpoint_t *);
Index: uspace/lib/usbhost/include/usb/host/hcd.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/hcd.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbhost/include/usb/host/hcd.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -78,5 +78,6 @@
 
 	/** Generate IRQ code to handle interrupts. */
-	int (*irq_code_gen)(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
+	int (*irq_code_gen)(irq_code_t *, hc_device_t *,
+	    const hw_res_list_parsed_t *, int *);
 
 	/** Claim device from BIOS. */
@@ -100,5 +101,6 @@
 
 /* Drivers should call this before leaving hc_add */
-static inline void hc_device_setup(hc_device_t *hcd, bus_t *bus) {
+static inline void hc_device_setup(hc_device_t *hcd, bus_t *bus)
+{
 	hcd->bus = bus;
 }
Index: uspace/lib/usbhost/include/usb/host/usb2_bus.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/usb2_bus.h	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbhost/include/usb/host/usb2_bus.h	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -61,5 +61,6 @@
 } usb2_bus_helper_t;
 
-extern void usb2_bus_helper_init(usb2_bus_helper_t *, const bandwidth_accounting_t *);
+extern void usb2_bus_helper_init(usb2_bus_helper_t *,
+    const bandwidth_accounting_t *);
 
 extern int usb2_bus_device_enumerate(usb2_bus_helper_t *, device_t *);
Index: uspace/lib/usbhost/src/bandwidth.c
===================================================================
--- uspace/lib/usbhost/src/bandwidth.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbhost/src/bandwidth.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -73,6 +73,5 @@
 	 * transaction, but I did not find text in USB spec to confirm this */
 	/* NOTE: All data packets will be considered to be max_packet_size */
-	switch (ep->device->speed)
-	{
+	switch (ep->device->speed) {
 	case USB_SPEED_LOW:
 		assert(type == USB_TRANSFER_INTERRUPT);
@@ -143,7 +142,9 @@
 	case USB_SPEED_LOW:
 		if (ep->direction == USB_DIRECTION_IN)
-			return 64060 + (2 * hub_ls_setup) + (677 * base_time) + host_delay;
+			return 64060 + (2 * hub_ls_setup) +
+				(677 * base_time) + host_delay;
 		else
-			return 64107 + (2 * hub_ls_setup) + (667 * base_time) + host_delay;
+			return 64107 + (2 * hub_ls_setup) +
+				(667 * base_time) + host_delay;
 
 	case USB_SPEED_FULL:
Index: uspace/lib/usbhost/src/hcd.c
===================================================================
--- uspace/lib/usbhost/src/hcd.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbhost/src/hcd.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -155,8 +155,9 @@
  * @return Negative error code.
  */
-static errno_t hcd_ddf_setup_interrupts(hc_device_t *hcd, const hw_res_list_parsed_t *hw_res)
+static errno_t hcd_ddf_setup_interrupts(hc_device_t *hcd,
+    const hw_res_list_parsed_t *hw_res)
 {
 	assert(hcd);
-	irq_code_t irq_code = {0};
+	irq_code_t irq_code = { 0 };
 
 	if (!hc_driver->irq_code_gen)
@@ -174,5 +175,6 @@
 	/* Register handler to avoid interrupt lockup */
 	int irq_cap;
-	ret = register_interrupt_handler(hcd->ddf_dev, irq, irq_handler, &irq_code, &irq_cap);
+	ret = register_interrupt_handler(hcd->ddf_dev, irq, irq_handler,
+	    &irq_code, &irq_cap);
 	irq_code_clean(&irq_code);
 	if (ret != EOK) {
@@ -212,5 +214,6 @@
 
 	if (!hc_driver->hc_add) {
-		usb_log_error("Driver '%s' does not support adding devices.", hc_driver->name);
+		usb_log_error("Driver '%s' does not support adding devices.",
+		    hc_driver->name);
 		return ENOTSUP;
 	}
@@ -292,5 +295,5 @@
 
 	usb_log_info("Controlling new `%s' device `%s'.",
-	   hc_driver->name, ddf_dev_get_name(device));
+	    hc_driver->name, ddf_dev_get_name(device));
 	return EOK;
 
Index: uspace/lib/usbvirt/src/ipc_hc.c
===================================================================
--- uspace/lib/usbvirt/src/ipc_hc.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbvirt/src/ipc_hc.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -77,5 +77,6 @@
 	}
 	
-	errno_t rc = async_data_write_start(exch, setup_buffer, setup_buffer_size);
+	errno_t rc = async_data_write_start(exch, setup_buffer,
+	    setup_buffer_size);
 	if (rc != EOK) {
 		async_exchange_end(exch);
@@ -85,6 +86,6 @@
 	
 	ipc_call_t data_request_call;
-	aid_t data_request = async_data_read(exch, data_buffer, data_buffer_size,
-	    &data_request_call);
+	aid_t data_request = async_data_read(exch, data_buffer,
+	    data_buffer_size, &data_request_call);
 	
 	async_exchange_end(exch);
@@ -150,5 +151,6 @@
 	}
 	
-	errno_t rc = async_data_write_start(exch, setup_buffer, setup_buffer_size);
+	errno_t rc = async_data_write_start(exch, setup_buffer,
+	    setup_buffer_size);
 	if (rc != EOK) {
 		async_exchange_end(exch);
@@ -158,5 +160,6 @@
 	
 	if (data_buffer_size > 0) {
-		rc = async_data_write_start(exch, data_buffer, data_buffer_size);
+		rc = async_data_write_start(exch, data_buffer,
+		    data_buffer_size);
 		if (rc != EOK) {
 			async_exchange_end(exch);
Index: uspace/lib/usbvirt/src/transfer.c
===================================================================
--- uspace/lib/usbvirt/src/transfer.c	(revision 36926786cdf31ca26201b1e160c68b3047be0430)
+++ uspace/lib/usbvirt/src/transfer.c	(revision ae3a9413512275bb229f67ecbbb46ce1739a954a)
@@ -119,5 +119,6 @@
  * @return Error code.
  */
-errno_t usbvirt_control_read(usbvirt_device_t *dev, const void *setup, size_t setup_size,
+errno_t usbvirt_control_read(usbvirt_device_t *dev,
+    const void *setup, size_t setup_size,
     void *data, size_t data_size, size_t *data_size_sent)
 {
