Browse Source

Merge branches 'acpi-scan-fixes' and 'acpica-fixes'

* acpi-scan-fixes:
  ACPI / scan: Set the visited flag for all enumerated devices

* acpica-fixes:
  Revert "ACPICA: Resources: Not a valid resource if buffer length too long"
Rafael J. Wysocki 8 years ago
parent
commit
f83e13f94e
1 changed files with 5 additions and 12 deletions
  1. 5 12
      drivers/acpi/acpica/utresrc.c

+ 5 - 12
drivers/acpi/acpica/utresrc.c

@@ -421,10 +421,8 @@ acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state,
 
 
 	ACPI_FUNCTION_TRACE(ut_walk_aml_resources);
 	ACPI_FUNCTION_TRACE(ut_walk_aml_resources);
 
 
-	/*
-	 * The absolute minimum resource template is one end_tag descriptor.
-	 * However, we will treat a lone end_tag as just a simple buffer.
-	 */
+	/* The absolute minimum resource template is one end_tag descriptor */
+
 	if (aml_length < sizeof(struct aml_resource_end_tag)) {
 	if (aml_length < sizeof(struct aml_resource_end_tag)) {
 		return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG);
 		return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG);
 	}
 	}
@@ -456,8 +454,9 @@ acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state,
 		/* Invoke the user function */
 		/* Invoke the user function */
 
 
 		if (user_function) {
 		if (user_function) {
-			status = user_function(aml, length, offset,
-					       resource_index, context);
+			status =
+			    user_function(aml, length, offset, resource_index,
+					  context);
 			if (ACPI_FAILURE(status)) {
 			if (ACPI_FAILURE(status)) {
 				return_ACPI_STATUS(status);
 				return_ACPI_STATUS(status);
 			}
 			}
@@ -481,12 +480,6 @@ acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state,
 				*context = aml;
 				*context = aml;
 			}
 			}
 
 
-			/* Check if buffer is defined to be longer than the resource length */
-
-			if (aml_length > (offset + length)) {
-				return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG);
-			}
-
 			/* Normal exit */
 			/* Normal exit */
 
 
 			return_ACPI_STATUS(AE_OK);
 			return_ACPI_STATUS(AE_OK);