Index: uspace/drv/usbhub/port_status.h
===================================================================
--- uspace/drv/usbhub/port_status.h	(revision 7d521e248cf09e5e6637a3ddfb9a8c2d4ac5d716)
+++ uspace/drv/usbhub/port_status.h	(revision 6ab7f3e94742316cc6a565a1bcb864ad3709c914)
@@ -64,6 +64,5 @@
  */
 static inline void usb_hub_set_port_status_request(
-	usb_device_request_setup_packet_t * request, uint16_t port
-	) {
+    usb_device_request_setup_packet_t *request, uint16_t port) {
 	request->index = port;
 	request->request_type = USB_HUB_REQ_TYPE_GET_PORT_STATUS;
@@ -79,6 +78,5 @@
  */
 static inline void usb_hub_set_hub_status_request(
-	usb_device_request_setup_packet_t * request
-	) {
+    usb_device_request_setup_packet_t *request) {
 	request->index = 0;
 	request->request_type = USB_HUB_REQ_TYPE_GET_HUB_STATUS;
@@ -95,6 +93,6 @@
 static inline usb_device_request_setup_packet_t *
 usb_hub_create_port_status_request(uint16_t port) {
-	usb_device_request_setup_packet_t * result =
-		malloc(sizeof(usb_device_request_setup_packet_t));
+	usb_device_request_setup_packet_t *result =
+	    malloc(sizeof (usb_device_request_setup_packet_t));
 	usb_hub_set_port_status_request(result, port);
 	return result;
@@ -108,7 +106,6 @@
  */
 static inline void usb_hub_set_enable_port_feature_request(
-	usb_device_request_setup_packet_t * request, uint16_t port,
-	uint16_t feature_selector
-	) {
+    usb_device_request_setup_packet_t *request, uint16_t port,
+    uint16_t feature_selector) {
 	request->index = port;
 	request->request_type = USB_HUB_REQ_TYPE_SET_PORT_FEATURE;
@@ -125,7 +122,7 @@
  */
 static inline void usb_hub_set_disable_port_feature_request(
-	usb_device_request_setup_packet_t * request, uint16_t port,
-	uint16_t feature_selector
-	) {
+    usb_device_request_setup_packet_t *request, uint16_t port,
+    uint16_t feature_selector
+    ) {
 	request->index = port;
 	request->request_type = USB_HUB_REQ_TYPE_SET_PORT_FEATURE;
@@ -141,6 +138,6 @@
  */
 static inline void usb_hub_set_enable_port_request(
-	usb_device_request_setup_packet_t * request, uint16_t port
-	) {
+    usb_device_request_setup_packet_t *request, uint16_t port
+    ) {
 	request->index = port;
 	request->request_type = USB_HUB_REQ_TYPE_SET_PORT_FEATURE;
@@ -157,6 +154,6 @@
 static inline usb_device_request_setup_packet_t *
 usb_hub_create_enable_port_request(uint16_t port) {
-	usb_device_request_setup_packet_t * result =
-		malloc(sizeof(usb_device_request_setup_packet_t));
+	usb_device_request_setup_packet_t *result =
+	    malloc(sizeof (usb_device_request_setup_packet_t));
 	usb_hub_set_enable_port_request(result, port);
 	return result;
@@ -169,6 +166,6 @@
  */
 static inline void usb_hub_set_disable_port_request(
-	usb_device_request_setup_packet_t * request, uint16_t port
-	) {
+    usb_device_request_setup_packet_t *request, uint16_t port
+    ) {
 	request->index = port;
 	request->request_type = USB_HUB_REQ_TYPE_SET_PORT_FEATURE;
@@ -185,6 +182,6 @@
 static inline usb_device_request_setup_packet_t *
 usb_hub_create_disable_port_request(uint16_t port) {
-	usb_device_request_setup_packet_t * result =
-		malloc(sizeof(usb_device_request_setup_packet_t));
+	usb_device_request_setup_packet_t *result =
+	    malloc(sizeof (usb_device_request_setup_packet_t));
 	usb_hub_set_disable_port_request(result, port);
 	return result;
@@ -197,6 +194,6 @@
  */
 static inline void usb_hub_set_reset_port_request(
-	usb_device_request_setup_packet_t * request, uint16_t port
-	) {
+    usb_device_request_setup_packet_t *request, uint16_t port
+    ) {
 	request->index = port;
 	request->request_type = USB_HUB_REQ_TYPE_SET_PORT_FEATURE;
@@ -213,6 +210,6 @@
 static inline usb_device_request_setup_packet_t *
 usb_hub_create_reset_port_request(uint16_t port) {
-	usb_device_request_setup_packet_t * result =
-		malloc(sizeof(usb_device_request_setup_packet_t));
+	usb_device_request_setup_packet_t *result =
+	    malloc(sizeof (usb_device_request_setup_packet_t));
 	usb_hub_set_reset_port_request(result, port);
 	return result;
@@ -225,6 +222,6 @@
  */
 static inline void usb_hub_set_power_port_request(
-	usb_device_request_setup_packet_t * request, uint16_t port
-	) {
+    usb_device_request_setup_packet_t *request, uint16_t port
+    ) {
 	request->index = port;
 	request->request_type = USB_HUB_REQ_TYPE_SET_PORT_FEATURE;
@@ -240,6 +237,6 @@
  */
 static inline void usb_hub_unset_power_port_request(
-	usb_device_request_setup_packet_t * request, uint16_t port
-	) {
+    usb_device_request_setup_packet_t *request, uint16_t port
+    ) {
 	request->index = port;
 	request->request_type = USB_HUB_REQ_TYPE_SET_PORT_FEATURE;
@@ -257,5 +254,5 @@
  */
 static inline bool usb_port_is_status(usb_port_status_t status, int idx) {
-	return (status&(1 << idx))!=0;
+	return (status & (1 << idx)) != 0;
 }
 
@@ -268,8 +265,8 @@
  */
 static inline void usb_port_status_set_bit(
-	usb_port_status_t * status, int idx, bool value) {
+    usb_port_status_t * status, int idx, bool value) {
 	(*status) = value ?
-		((*status) | (1 << (idx))) :
-		((*status)&(~(1 << (idx))));
+	    ((*status) | (1 << (idx))) :
+	    ((*status)&(~(1 << (idx))));
 }
 
@@ -282,5 +279,5 @@
  */
 static inline bool usb_hub_is_status(usb_hub_status_t status, int idx) {
-	return (status&(1 << idx))!=0;
+	return (status & (1 << idx)) != 0;
 }
 
@@ -293,141 +290,10 @@
  */
 static inline void usb_hub_status_set_bit(
-	usb_hub_status_t * status, int idx, bool value) {
+    usb_hub_status_t *status, int idx, bool value) {
 	(*status) = value ?
-		((*status) | (1 << (idx))) :
-		((*status)&(~(1 << (idx))));
-}
-
-
-#if 0
-/**
- * connection status geter for port status
- * 
- * @param status
- * @return true if there is something connected
- */
-static inline bool usb_port_dev_connected(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 0);
-}
-
-/**
- * set device connected bit in port status
- *
- * @param status
- * @param connected value of the bit
- */
-static inline void usb_port_set_dev_connected(usb_port_status_t * status, bool connected) {
-	usb_port_set_bit(status, 0, connected);
-}
-
-//port enabled
-
-/**
- * port enabled getter for port status
- * 
- * @param status
- * @return true if the port is enabled
- */
-static inline bool usb_port_enabled(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 1);
-}
-
-/**
- * set port enabled bit in port status
- *
- * @param status
- * @param enabled value of the bit
- */
-static inline void usb_port_set_enabled(usb_port_status_t * status, bool enabled) {
-	usb_port_set_bit(status, 1, enabled);
-}
-
-//port suspended
-/**
- * port suspended getter for port status
- *
- * @param status
- * @return true if port is suspended
- */
-static inline bool usb_port_suspended(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 2);
-}
-
-/**
- * set port suspended bit in port status
- *
- * @param status
- * @param suspended value of the bit
- */
-static inline void usb_port_set_suspended(usb_port_status_t * status, bool suspended) {
-	usb_port_set_bit(status, 2, suspended);
-}
-
-//over currect
-/**
- * over current condition indicator getter for port status
- *
- * @param status
- * @return true if there is opver-current condition on the hub
- */
-static inline bool usb_port_over_current(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 3);
-}
-
-/**
- * set over current indicator bit in port status
- *
- * @param status
- * @param value value of the bit
- */
-static inline void usb_port_set_over_current(usb_port_status_t * status, bool value) {
-	usb_port_set_bit(status, 3, value);
-}
-
-//port reset
-/**
- * port reset indicator getter for port status
- * 
- * @param status
- * @return true if port is reset
- */
-static inline bool usb_port_reset(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 4);
-}
-
-/**
- * set port reset bit in port status
- *
- * @param status
- * @param value value of the bit
- */
-static inline void usb_port_set_reset(usb_port_status_t * status, bool value) {
-	usb_port_set_bit(status, 4, value);
-}
-
-//powered
-/**
- * power state getter for port status
- *
- * @param status
- * @return true if port is powered
- */
-static inline bool usb_port_powered(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 8);
-}
-
-/**
- * set port powered bit in port status
- *
- * @param status
- * @param powered value of the bit
- */
-static inline void usb_port_set_powered(usb_port_status_t * status, bool powered) {
-	usb_port_set_bit(status, 8, powered);
-}
-
-#endif
-
-//low speed device attached
+	    ((*status) | (1 << (idx))) :
+	    ((*status)&(~(1 << (idx))));
+}
+
 /**
  * low speed device on the port indicator
@@ -446,9 +312,10 @@
  * @param low_speed value of the bit
  */
-static inline void usb_port_set_low_speed(usb_port_status_t * status, bool low_speed) {
+static inline void usb_port_set_low_speed(usb_port_status_t *status, bool low_speed) {
 	usb_port_status_set_bit(status, 9, low_speed);
 }
 
 //high speed device attached
+
 /**
  * high speed device on the port indicator
@@ -467,5 +334,5 @@
  * @param high_speed value of the bit
  */
-static inline void usb_port_set_high_speed(usb_port_status_t * status, bool high_speed) {
+static inline void usb_port_set_high_speed(usb_port_status_t *status, bool high_speed) {
 	usb_port_status_set_bit(status, 10, high_speed);
 }
@@ -485,197 +352,4 @@
 }
 
-#if 0
-//connect change
-/**
- * port connect change indicator
- *
- * @param status
- * @return true if connection has changed
- */
-static inline bool usb_port_connect_change(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 16);
-}
-
-/**
- * set connection change bit in port status
- * @param status
- * @param change value of the bit
- */
-static inline void usb_port_set_connect_change(usb_port_status_t * status, bool change) {
-	usb_port_set_bit(status, 16, change);
-}
-
-//port enable change
-/**
- * port enable change for port status
- *
- * @param status
- * @return true if the port has been enabled/disabled
- */
-static inline bool usb_port_enabled_change(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 17);
-}
-
-/**
- * set port enable change bit in port status
- *
- * @param status
- * @param change value of the bit
- */
-static inline void usb_port_set_enabled_change(usb_port_status_t * status, bool change) {
-	usb_port_set_bit(status, 17, change);
-}
-
-//suspend change
-/**
- * port suspend change for port status
- * 
- * @param status
- * @return ture if suspend status has changed
- */
-static inline bool usb_port_suspend_change(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 18);
-}
-
-/**
- * set port suspend change bit in port status
- *
- * @param status
- * @param change value of the bit
- */
-static inline void usb_port_set_suspend_change(usb_port_status_t * status, bool change) {
-	usb_port_set_bit(status, 18, change);
-}
-
-//over current change
-/**
- * over current change indicator
- * 
- * @param status
- * @return true if over-current condition on port has changed
- */
-static inline bool usb_port_overcurrent_change(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 19);
-}
-
-/**
- * set port over current change bit in port status
- *
- * @param status
- * @param change value of the bit
- */
-static inline void usb_port_set_overcurrent_change(usb_port_status_t * status, bool change) {
-	usb_port_set_bit(status, 19, change);
-}
-
-//reset change
-/**
- * port reset change indicator
- * @param status
- * @return true if port has been reset
- */
-static inline bool usb_port_reset_completed(usb_port_status_t * status) {
-	return usb_port_get_bit(status, 20);
-}
-
-/**
- * set port reset completed bit in port status
- *
- * @param status
- * @param change value of the bit
- */
-static inline void usb_port_set_reset_completed(usb_port_status_t * status, bool completed) {
-	usb_port_set_bit(status, 20, completed);
-}
-
-//local power status
-/**
- * local power lost indicator for hub status
- * 
- * @param status
- * @return true if hub is not powered
- */
-static inline bool usb_hub_local_power_lost(usb_hub_status_t * status) {
-	return usb_hub_get_bit(status, 0);
-}
-
-/**
- * set hub power lost bit in hub status
- *
- * @param status
- * @param change value of the bit
- */
-static inline void usb_hub_set_local_power_lost(usb_port_status_t * status,
-	bool power_lost) {
-	usb_hub_set_bit(status, 0, power_lost);
-}
-
-//over current ocndition
-/**
- * hub over-current indicator
- *
- * @param status
- * @return true if over-current condition occurred on hub
- */
-static inline bool usb_hub_over_current(usb_hub_status_t * status) {
-	return usb_hub_get_bit(status, 1);
-}
-
-/**
- * set hub over current bit in hub status
- *
- * @param status
- * @param change value of the bit
- */
-static inline void usb_hub_set_over_current(usb_port_status_t * status,
-	bool over_current) {
-	usb_hub_set_bit(status, 1, over_current);
-}
-
-//local power change
-/**
- * hub power change indicator
- *
- * @param status
- * @return true if local power status has been changed - power has been
- * dropped or re-established
- */
-static inline bool usb_hub_local_power_change(usb_hub_status_t * status) {
-	return usb_hub_get_bit(status, 16);
-}
-
-/**
- * set hub power change bit in hub status
- *
- * @param status
- * @param change value of the bit
- */
-static inline void usb_hub_set_local_power_change(usb_port_status_t * status,
-	bool change) {
-	usb_hub_set_bit(status, 16, change);
-}
-
-//local power status
-/**
- * hub over-current condition change indicator
- *
- * @param status
- * @return true if over-current condition has changed
- */
-static inline bool usb_hub_over_current_change(usb_hub_status_t * status) {
-	return usb_hub_get_bit(status, 17);
-}
-
-/**
- * set hub over current change bit in hub status
- *
- * @param status
- * @param change value of the bit
- */
-static inline void usb_hub_set_over_current_change(usb_port_status_t * status,
-	bool change) {
-	usb_hub_set_bit(status, 17, change);
-}
-#endif
 
 
