Index: uspace/lib/usbhid/src/hiddescriptor.c
===================================================================
--- uspace/lib/usbhid/src/hiddescriptor.c	(revision e0a5d4cfd543daee5dd5a861793ddd18dcb32c0b)
+++ uspace/lib/usbhid/src/hiddescriptor.c	(revision 3061bc129a855122d429fbba1e623a521aaa164c)
@@ -85,6 +85,6 @@
  * inserts it if not.
  *
- * @param report Report structure 
- * @param cmp_path The collection path 
+ * @param report Report structure
+ * @param cmp_path The collection path
  * @return Pointer to the result collection path in report structure.
  * @retval NULL If some error occurs
@@ -122,5 +122,5 @@
 	else {
 		return list_get_instance(path_it, usb_hid_report_path_t,
-				cpath_link); 
+				cpath_link);
 	}
 }
@@ -156,5 +156,5 @@
  * @param report Report structure in which the new report items should be
  * 		 stored
- * @param report_item Current report descriptor's parsing state table 
+ * @param report_item Current report descriptor's parsing state table
  * @return Error code
  * @retval EOK If all fields were successfully append to report
@@ -179,5 +179,5 @@
 		usages = malloc(sizeof(uint32_t) * report_item->usages_count);
 		memcpy(usages, report_item->usages, sizeof(int32_t) *
-				report_item->usages_count); 
+				report_item->usages_count);
 	}
 	else {
@@ -185,5 +185,5 @@
 	}
 	
-	usb_hid_report_path_t *path = report_item->usage_path;	
+	usb_hid_report_path_t *path = report_item->usage_path;
 	for(i=0; i<report_item->count; i++){
 
@@ -196,5 +196,5 @@
 		link_initialize(&field->ritems_link);
 
-		/* fill the attributes */		
+		/* fill the attributes */
 		field->logical_minimum = report_item->logical_minimum;
 		field->logical_maximum = report_item->logical_maximum;
@@ -203,5 +203,5 @@
 
 		if(USB_HID_ITEM_FLAG_VARIABLE(report_item->item_flags) == 0){
-			/* 
+			/*
 			Store usage array. The Correct Usage Page and Usage is
 			depending on data in report and will be filled later
@@ -223,10 +223,10 @@
 			else {
 				usage = report_item->usages[
-					report_item->usages_count- 1]; 
+					report_item->usages_count- 1];
 			}
 
 			if(USB_HID_IS_EXTENDED_USAGE(usage)){
 				field->usage = USB_HID_EXTENDED_USAGE(usage);
-				field->usage_page = 
+				field->usage_page =
 					USB_HID_EXTENDED_USAGE_PAGE(usage);
 			}
@@ -324,6 +324,6 @@
 	    usb_hid_report_description_t, report_des) {
 		// if report id not set, return the first of the type
-		if(((report_des->report_id == report_id) || (report_id == 0)) && 
-		   (report_des->type == type)) { 
+		if(((report_des->report_id == report_id) || (report_id == 0)) &&
+		   (report_des->type == type)) {
 			return report_des;
 		}
@@ -343,5 +343,5 @@
  * @retval EOK If report descriptor is successfully parsed
  */
-errno_t usb_hid_parse_report_descriptor(usb_hid_report_t *report, 
+errno_t usb_hid_parse_report_descriptor(usb_hid_report_t *report,
     const uint8_t *data, size_t size)
 {
@@ -352,5 +352,5 @@
 	int ret;
 	usb_hid_report_item_t *report_item=0;
-	usb_hid_report_item_t *new_report_item;	
+	usb_hid_report_item_t *new_report_item;
 	usb_hid_report_path_t *usage_path;
 
@@ -380,7 +380,7 @@
 		return ENOMEM;
 	}
-	usb_hid_report_path_append_item(usage_path, 0, 0);	
-	
-	while(i<size){	
+	usb_hid_report_path_append_item(usage_path, 0, 0);
+	
+	while(i<size){
 		if(!USB_HID_ITEM_IS_LONG(data[i])){
 
@@ -412,27 +412,27 @@
 				switch(tag) {
 				case USB_HID_REPORT_TAG_INPUT:
-					report_item->type = 
+					report_item->type =
 					    USB_HID_REPORT_TYPE_INPUT;
 
 					report_item->offset = offset_input;
-					offset_input += report_item->count * 
+					offset_input += report_item->count *
 					    report_item->size;
 					break;
 	
 				case USB_HID_REPORT_TAG_OUTPUT:
-					report_item->type = 
+					report_item->type =
 					    USB_HID_REPORT_TYPE_OUTPUT;
 					
 					report_item->offset = offset_output;
-					offset_output += report_item->count * 
+					offset_output += report_item->count *
 					    report_item->size;
 					break;
 	
 				case USB_HID_REPORT_TAG_FEATURE:
-					report_item->type = 
+					report_item->type =
 					    USB_HID_REPORT_TYPE_FEATURE;
 
 					report_item->offset = offset_feature;
-					offset_feature += report_item->count * 
+					offset_feature += report_item->count *
 						report_item->size;
 					break;
@@ -444,8 +444,8 @@
 				}
 					
-				/* 
-				 * append new fields to the report structure 					 
+				/*
+				 * append new fields to the report structure
 				 */
-				usb_hid_report_append_fields(report, 
+				usb_hid_report_append_fields(report,
 				    report_item);
 
@@ -458,5 +458,5 @@
 				offset_output = 0;
 				offset_feature = 0;
-				usb_hid_report_path_set_report_id (usage_path, 
+				usb_hid_report_path_set_report_id (usage_path,
 				    report_item->id);
 				break;
@@ -467,8 +467,8 @@
 				    report_item);
 				
-				usb_hid_report_path_t *tmp_path = 
+				usb_hid_report_path_t *tmp_path =
 				    usb_hid_report_path_clone(usage_path);
 
-				new_report_item->usage_path = tmp_path; 
+				new_report_item->usage_path = tmp_path;
 
 				list_prepend (&new_report_item->link, &stack);
@@ -490,8 +490,8 @@
 				    usb_hid_report_usage_path_t, rpath_items_link);
 				
-				usb_hid_report_set_last_item(usage_path, 
+				usb_hid_report_set_last_item(usage_path,
 				    USB_HID_TAG_CLASS_GLOBAL, tmp_usage_path->usage_page);
 				
-				usb_hid_report_set_last_item(usage_path, 
+				usb_hid_report_set_last_item(usage_path,
 				    USB_HID_TAG_CLASS_LOCAL, tmp_usage_path->usage);
 
@@ -502,5 +502,5 @@
 					
 			default:
-				// nothing special to do					
+				// nothing special to do
 				break;
 			}
@@ -533,5 +533,5 @@
 int usb_hid_report_parse_tag(uint8_t tag, uint8_t class, const uint8_t *data,
 	size_t item_size, usb_hid_report_item_t *report_item,
-	usb_hid_report_path_t *usage_path) {	
+	usb_hid_report_path_t *usage_path) {
 	
 	int ret;
@@ -550,10 +550,10 @@
 		break;
 
-	case USB_HID_TAG_CLASS_GLOBAL:	
+	case USB_HID_TAG_CLASS_GLOBAL:
 		return usb_hid_report_parse_global_tag(tag, data, item_size,
 			report_item, usage_path);
 		break;
 
-	case USB_HID_TAG_CLASS_LOCAL:			
+	case USB_HID_TAG_CLASS_LOCAL:
 		return usb_hid_report_parse_local_tag(tag, data, item_size,
 			report_item, usage_path);
@@ -575,5 +575,5 @@
  */
 
-int usb_hid_report_parse_main_tag(uint8_t tag, const uint8_t *data, 
+int usb_hid_report_parse_main_tag(uint8_t tag, const uint8_t *data,
 	size_t item_size, usb_hid_report_item_t *report_item,
 	usb_hid_report_path_t *usage_path)
@@ -586,6 +586,6 @@
 	case USB_HID_REPORT_TAG_OUTPUT:
 	case USB_HID_REPORT_TAG_FEATURE:
-		report_item->item_flags = *data;			
-		return 0;			
+		report_item->item_flags = *data;
+		return 0;
 		break;
 			
@@ -598,11 +598,11 @@
 			
 		/* set last item */
-		usb_hid_report_set_last_item(usage_path, 
-			USB_HID_TAG_CLASS_GLOBAL, 
+		usb_hid_report_set_last_item(usage_path,
+			USB_HID_TAG_CLASS_GLOBAL,
 			USB_HID_EXTENDED_USAGE_PAGE(report_item->usages[
 				report_item->usages_count-1]));
 
-		usb_hid_report_set_last_item(usage_path, 
-			USB_HID_TAG_CLASS_LOCAL, 
+		usb_hid_report_set_last_item(usage_path,
+			USB_HID_TAG_CLASS_LOCAL,
 			USB_HID_EXTENDED_USAGE(report_item->usages[
 				report_item->usages_count-1]));
@@ -610,6 +610,6 @@
 		/* append the new one which will be set by common usage/usage
 		 * page */
-		usb_hid_report_path_append_item(usage_path, 
-			report_item->usage_page, 
+		usb_hid_report_path_append_item(usage_path,
+			report_item->usage_page,
 			report_item->usages[report_item->usages_count-1]);
 
@@ -639,12 +639,12 @@
  * @return 0 or USB_HID_ code
  */
-int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data, 
-	size_t item_size, usb_hid_report_item_t *report_item, 
-	usb_hid_report_path_t *usage_path) { 
+int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data,
+	size_t item_size, usb_hid_report_item_t *report_item,
+	usb_hid_report_path_t *usage_path) {
 	
 	switch(tag)
 	{
 	case USB_HID_REPORT_TAG_USAGE_PAGE:
-		report_item->usage_page = 
+		report_item->usage_page =
 			usb_hid_report_tag_data_uint32(data, item_size);
 		break;
@@ -658,5 +658,5 @@
 	case USB_HID_REPORT_TAG_LOGICAL_MAXIMUM:
 		report_item->logical_maximum = USB_HID_UINT32_TO_INT32(
-			usb_hid_report_tag_data_uint32(data,item_size), 
+			usb_hid_report_tag_data_uint32(data,item_size),
 			item_size * 8);
 		break;
@@ -664,11 +664,11 @@
 	case USB_HID_REPORT_TAG_PHYSICAL_MINIMUM:
 		report_item->physical_minimum = USB_HID_UINT32_TO_INT32(
-			usb_hid_report_tag_data_uint32(data,item_size), 
+			usb_hid_report_tag_data_uint32(data,item_size),
 			item_size * 8);
-		break;			
+		break;
 
 	case USB_HID_REPORT_TAG_PHYSICAL_MAXIMUM:
 		report_item->physical_maximum = USB_HID_UINT32_TO_INT32(
-			usb_hid_report_tag_data_uint32(data,item_size), 
+			usb_hid_report_tag_data_uint32(data,item_size),
 			item_size * 8);
 		break;
@@ -695,5 +695,5 @@
 
 	case USB_HID_REPORT_TAG_REPORT_ID:
-		report_item->id = usb_hid_report_tag_data_uint32(data, 
+		report_item->id = usb_hid_report_tag_data_uint32(data,
 			item_size);
 		return USB_HID_RESET_OFFSET;
@@ -702,5 +702,5 @@
 	case USB_HID_REPORT_TAG_PUSH:
 	case USB_HID_REPORT_TAG_POP:
-		/* 
+		/*
 		 * stack operations are done in top level parsing
 		 * function
@@ -943,5 +943,5 @@
 
 
-/** Frees the HID report descriptor parser structure 
+/** Frees the HID report descriptor parser structure
  *
  * @param parser Opaque HID report parser structure
