Index: uspace/lib/usbhid/src/hiddescriptor.c
===================================================================
--- uspace/lib/usbhid/src/hiddescriptor.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ uspace/lib/usbhid/src/hiddescriptor.c	(revision d5e5fd1214ee9617b9a936d6f09efec4c9a91b48)
@@ -63,5 +63,5 @@
 
 
-	
+
 /** The new report item flag. Used to determine when the item is completly
  * configured and should be added to the report structure
@@ -95,13 +95,13 @@
 	link_t *path_it = report->collection_paths.head.next;
 	usb_hid_report_path_t *path = NULL;
-	
+
 	if((report == NULL) || (cmp_path == NULL)) {
 		return NULL;
 	}
-	
+
 	while(path_it != &report->collection_paths.head) {
 		path = list_get_instance(path_it, usb_hid_report_path_t,
 				cpath_link);
-		
+
 		if(usb_hid_report_compare_usage_path(path, cmp_path,
 					USB_HID_PATH_COMPARE_STRICT) == 0){
@@ -184,5 +184,5 @@
 		usages = NULL;
 	}
-	
+
 	usb_hid_report_path_t *path = report_item->usage_path;
 	for(i=0; i<report_item->count; i++){
@@ -237,5 +237,5 @@
 			}
 		}
-		
+
 		usb_hid_report_set_last_item(path, USB_HID_TAG_CLASS_GLOBAL,
 				field->usage_page);
@@ -261,5 +261,5 @@
 		report_des = usb_hid_report_find_description(report,
 			report_item->id, report_item->type);
-		
+
 		if(report_des == NULL){
 			report_des = malloc(
@@ -288,5 +288,5 @@
 		/* append this field to the end of founded report list */
 		list_append(&field->ritems_link, &report_des->report_items);
-		
+
 		/* update the sizes */
 		report_des->bit_length += field->size;
@@ -358,5 +358,5 @@
 	size_t offset_output=0;
 	size_t offset_feature=0;
-	
+
 	link_t *item_link;
 
@@ -368,5 +368,5 @@
 		return EINVAL;
 	}
-	
+
 	/*report item initialization*/
 	if(!(report_item=malloc(sizeof(usb_hid_report_item_t)))){
@@ -381,5 +381,5 @@
 	}
 	usb_hid_report_path_append_item(usage_path, 0, 0);
-	
+
 	while(i<size){
 		if(!USB_HID_ITEM_IS_LONG(data[i])){
@@ -388,9 +388,9 @@
 				return EINVAL;
 			}
-			
+
 			tag = USB_HID_ITEM_TAG(data[i]);
 			item_size = USB_HID_ITEM_SIZE(data[i]);
 			class = USB_HID_ITEM_TAG_CLASS(data[i]);
-			
+
 			ret = usb_hid_report_parse_tag(tag,class,data+i+1,
 				item_size,report_item, usage_path);
@@ -402,12 +402,12 @@
 				 */
 				report_item->usage_path = usage_path;
-					
+
 				usb_hid_report_path_set_report_id(
 				     report_item->usage_path, report_item->id);
-				
+
 				if(report_item->id != 0){
 					report->use_report_ids = 1;
 				}
-					
+
 				switch(tag) {
 				case USB_HID_REPORT_TAG_INPUT:
@@ -419,14 +419,14 @@
 					    report_item->size;
 					break;
-	
+
 				case USB_HID_REPORT_TAG_OUTPUT:
 					report_item->type =
 					    USB_HID_REPORT_TYPE_OUTPUT;
-					
+
 					report_item->offset = offset_output;
 					offset_output += report_item->count *
 					    report_item->size;
 					break;
-	
+
 				case USB_HID_REPORT_TAG_FEATURE:
 					report_item->type =
@@ -437,5 +437,5 @@
 						report_item->size;
 					break;
-	
+
 				default:
 					usb_log_debug2(
@@ -443,5 +443,5 @@
 				    	break;
 				}
-					
+
 				/*
 				 * append new fields to the report structure
@@ -466,5 +466,5 @@
 				new_report_item = usb_hid_report_item_clone(
 				    report_item);
-				
+
 				usb_hid_report_path_t *tmp_path =
 				    usb_hid_report_path_clone(usage_path);
@@ -481,16 +481,16 @@
 				}
 				free(report_item);
-				
+
 				report_item = list_get_instance(item_link,
 				    usb_hid_report_item_t, link);
-				
+
 				usb_hid_report_usage_path_t *tmp_usage_path;
 				tmp_usage_path = list_get_instance(
 				    report_item->usage_path->cpath_link.prev,
 				    usb_hid_report_usage_path_t, rpath_items_link);
-				
+
 				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_TAG_CLASS_LOCAL, tmp_usage_path->usage);
@@ -498,7 +498,7 @@
 				usb_hid_report_path_free(report_item->usage_path);
 				list_remove (item_link);
-					
+
 				break;
-					
+
 			default:
 				// nothing special to do
@@ -513,8 +513,8 @@
 			i += 3 + USB_HID_ITEM_SIZE(data[i+1]);
 		}
-		
-
-	}
-	
+
+
+	}
+
 	return EOK;
 }
@@ -534,7 +534,7 @@
 	size_t item_size, usb_hid_report_item_t *report_item,
 	usb_hid_report_path_t *usage_path) {
-	
+
 	int ret;
-	
+
 	switch(class){
 	case USB_HID_TAG_CLASS_MAIN:
@@ -559,5 +559,5 @@
 			report_item, usage_path);
 		break;
-	
+
 	default:
 		return USB_HID_NO_ACTION;
@@ -580,5 +580,5 @@
 {
 	usb_hid_report_usage_path_t *path_item;
-	
+
 	switch(tag)
 	{
@@ -589,5 +589,5 @@
 		return 0;
 		break;
-			
+
 	case USB_HID_REPORT_TAG_COLLECTION:
 
@@ -596,5 +596,5 @@
 			usb_hid_report_usage_path_t, rpath_items_link);
 		path_item->flags = *data;
-			
+
 		/* set last item */
 		usb_hid_report_set_last_item(usage_path,
@@ -607,5 +607,5 @@
 			USB_HID_EXTENDED_USAGE(report_item->usages[
 				report_item->usages_count-1]));
-			
+
 		/* append the new one which will be set by common usage/usage
 		 * page */
@@ -617,5 +617,5 @@
 		return USB_HID_NO_ACTION;
 		break;
-			
+
 	case USB_HID_REPORT_TAG_END_COLLECTION:
 		usb_hid_report_remove_last_item(usage_path);
@@ -642,5 +642,5 @@
 	size_t item_size, usb_hid_report_item_t *report_item,
 	usb_hid_report_path_t *usage_path) {
-	
+
 	switch(tag)
 	{
@@ -699,5 +699,5 @@
 		return USB_HID_RESET_OFFSET;
 		break;
-	
+
 	case USB_HID_REPORT_TAG_PUSH:
 	case USB_HID_REPORT_TAG_POP:
@@ -708,5 +708,5 @@
 		return tag;
 		break;
-			
+
 	default:
 		return USB_HID_NO_ACTION;
@@ -730,5 +730,5 @@
 {
 	int32_t extended_usage;
-	
+
 	switch (tag) {
 	case USB_HID_REPORT_TAG_USAGE:
@@ -740,5 +740,5 @@
 			 */
 			break;
-			
+
 		case START_DELIMITER_SET:
 			report_item->in_delimiter = INSIDE_DELIMITER_SET;
@@ -748,13 +748,13 @@
 			extended_usage +=
 			    usb_hid_report_tag_data_uint32(data, item_size);
-			
+
 			report_item->usages[report_item->usages_count] =
 			    extended_usage;
-			
+
 			report_item->usages_count++;
 			break;
 		}
 		break;
-		
+
 	case USB_HID_REPORT_TAG_USAGE_MINIMUM:
 		if (item_size == 3) {
@@ -763,6 +763,6 @@
 			    USB_HID_EXTENDED_USAGE_PAGE(
 			    usb_hid_report_tag_data_uint32(data, item_size));
-			
-			
+
+
 			report_item->usage_minimum =
 			    USB_HID_EXTENDED_USAGE(
@@ -773,5 +773,5 @@
 		}
 		break;
-		
+
 	case USB_HID_REPORT_TAG_USAGE_MAXIMUM:
 		if (item_size == 3) {
@@ -781,10 +781,10 @@
 				return USB_HID_INVALID;
 			}
-			
+
 			/* Usage extended usages */
 			report_item->extended_usage_page =
 			    USB_HID_EXTENDED_USAGE_PAGE(
 			    usb_hid_report_tag_data_uint32(data,item_size));
-			
+
 			report_item->usage_maximum =
 			    USB_HID_EXTENDED_USAGE(
@@ -794,9 +794,9 @@
 			    usb_hid_report_tag_data_uint32(data,item_size);
 		}
-		
+
 		/* Put the records into the usages array */
 		for (int32_t i = report_item->usage_minimum;
 		    i <= report_item->usage_maximum; i++) {
-			
+
 			if (report_item->extended_usage_page) {
 				report_item->usages[report_item->usages_count++] =
@@ -808,46 +808,46 @@
 		}
 		report_item->extended_usage_page = 0;
-		
-		break;
-		
+
+		break;
+
 	case USB_HID_REPORT_TAG_DESIGNATOR_INDEX:
 		report_item->designator_index =
 		    usb_hid_report_tag_data_uint32(data, item_size);
 		break;
-	
+
 	case USB_HID_REPORT_TAG_DESIGNATOR_MINIMUM:
 		report_item->designator_minimum =
 		    usb_hid_report_tag_data_uint32(data, item_size);
 		break;
-	
+
 	case USB_HID_REPORT_TAG_DESIGNATOR_MAXIMUM:
 		report_item->designator_maximum =
 		    usb_hid_report_tag_data_uint32(data, item_size);
 		break;
-	
+
 	case USB_HID_REPORT_TAG_STRING_INDEX:
 		report_item->string_index =
 		    usb_hid_report_tag_data_uint32(data, item_size);
 		break;
-	
+
 	case USB_HID_REPORT_TAG_STRING_MINIMUM:
 		report_item->string_minimum =
 		    usb_hid_report_tag_data_uint32(data, item_size);
 		break;
-	
+
 	case USB_HID_REPORT_TAG_STRING_MAXIMUM:
 		report_item->string_maximum =
 		    usb_hid_report_tag_data_uint32(data, item_size);
 		break;
-	
+
 	case USB_HID_REPORT_TAG_DELIMITER:
 		report_item->in_delimiter =
 		    usb_hid_report_tag_data_uint32(data, item_size);
 		break;
-	
+
 	default:
 		return USB_HID_NO_ACTION;
 	}
-	
+
 	return 0;
 }
@@ -965,5 +965,5 @@
 		usb_hid_report_path_free(path);
 	}
-	
+
 	// free report items
 	usb_hid_report_description_t *report_des;
@@ -974,5 +974,5 @@
 
 		list_remove(&report_des->reports_link);
-		
+
 		while(!list_empty(&report_des->report_items)) {
 			field = list_get_instance(
@@ -984,8 +984,8 @@
 			free(field);
 		}
-		
+
 		free(report_des);
 	}
-	
+
 	return;
 }
Index: uspace/lib/usbhid/src/hidreport.c
===================================================================
--- uspace/lib/usbhid/src/hidreport.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ uspace/lib/usbhid/src/hidreport.c	(revision d5e5fd1214ee9617b9a936d6f09efec4c9a91b48)
@@ -55,9 +55,9 @@
 	assert(report_desc != NULL);
 	assert(size != NULL);
-	
+
 	usb_dp_parser_t parser =  {
 		.nesting = usb_dp_standard_descriptor_nesting
 	};
-	
+
 	usb_dp_parser_data_t parser_data = {
 		.data = usb_device_descriptors(dev)->full_config,
@@ -65,5 +65,5 @@
 		.arg = NULL
 	};
-	
+
 	/*
 	 * First nested descriptor of the configuration descriptor.
@@ -72,5 +72,5 @@
 	    usb_dp_get_nested_descriptor(&parser, &parser_data,
 	    usb_device_descriptors(dev)->full_config);
-	
+
 	/*
 	 * Find the interface descriptor corresponding to our interface number.
@@ -82,5 +82,5 @@
 		++i;
 	}
-	
+
 	if (d == NULL) {
 		usb_log_error("The %d. interface descriptor not found!",
@@ -88,5 +88,5 @@
 		return ENOENT;
 	}
-	
+
 	/*
 	 * First nested descriptor of the interface descriptor.
@@ -94,5 +94,5 @@
 	const uint8_t *iface_desc = d;
 	d = usb_dp_get_nested_descriptor(&parser, &parser_data, iface_desc);
-	
+
 	/*
 	 * Search through siblings until the HID descriptor is found.
@@ -102,10 +102,10 @@
 		    iface_desc, d);
 	}
-	
+
 	if (d == NULL) {
 		usb_log_fatal("No HID descriptor found!");
 		return ENOENT;
 	}
-	
+
 	if (*d != sizeof(usb_standard_hid_descriptor_t)) {
 		usb_log_error("HID descriptor has wrong size (%u, expected %zu"
@@ -113,8 +113,8 @@
 		return EINVAL;
 	}
-	
+
 	usb_standard_hid_descriptor_t *hid_desc =
 	    (usb_standard_hid_descriptor_t *)d;
-	
+
 	uint16_t length = uint16_usb2host(hid_desc->report_desc_info.length);
 	size_t actual_size = 0;
@@ -129,7 +129,7 @@
 		return ENOMEM;
 	}
-	
+
 	usb_log_debug("Getting Report descriptor, expected size: %u", length);
-	
+
 	/*
 	 * Get the descriptor from the device.
@@ -153,9 +153,9 @@
 		return EINVAL;
 	}
-	
+
 	*size = length;
-	
+
 	usb_log_debug("Done.");
-	
+
 	return EOK;
 }
@@ -171,10 +171,10 @@
 		return EINVAL;
 	}
-	
+
 //	uint8_t *report_desc = NULL;
 //	size_t report_size;
-	
+
 	errno_t rc = usb_hid_get_report_descriptor(dev, report_desc, report_size);
-	
+
 	if (rc != EOK) {
 		usb_log_error("Problem with getting Report descriptor: %s.",
@@ -186,7 +186,7 @@
 		return rc;
 	}
-	
+
 	assert(*report_desc != NULL);
-	
+
 	rc = usb_hid_parse_report_descriptor(report, *report_desc, *report_size);
 	if (rc != EOK) {
@@ -197,7 +197,7 @@
 		return rc;
 	}
-	
+
 	usb_hid_descriptor_print(report);
-	
+
 	return EOK;
 }
