ACPICA: misc fixes for new Table Manager:

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
index 9076ca0..9e0b3ce 100644
--- a/drivers/acpi/tables/tbinstal.c
+++ b/drivers/acpi/tables/tbinstal.c
@@ -61,7 +61,7 @@
  *****************************************************************************/
 acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc)
 {
-	u8 checksum;
+	acpi_status status;
 
 	ACPI_FUNCTION_TRACE(tb_verify_table);
 
@@ -84,17 +84,9 @@
 
 	/* Always calculate checksum, ignore bad checksum if requested */
 
-	checksum = acpi_tb_checksum(ACPI_CAST_PTR(void, table_desc->pointer),
-				    table_desc->length);
-
-#if (ACPI_CHECKSUM_ABORT)
-
-	if (checksum) {
-		return_ACPI_STATUS(AE_BAD_CHECKSUM);
-	}
-#endif
-
-	return_ACPI_STATUS(AE_OK);
+	status =
+	    acpi_tb_verify_checksum(table_desc->pointer, table_desc->length);
+	return_ACPI_STATUS(status);
 }
 
 /*******************************************************************************
@@ -188,7 +180,7 @@
 
 	/* allow_resize flag is a parameter to acpi_initialize_tables */
 
-	if (!(acpi_gbl_root_table_list.flags & ACPI_TABLE_FLAGS_ALLOW_RESIZE)) {
+	if (!(acpi_gbl_root_table_list.flags & ACPI_ROOT_ALLOW_RESIZE)) {
 		ACPI_ERROR((AE_INFO,
 			    "Resize of Root Table Array is not allowed"));
 		return_ACPI_STATUS(AE_SUPPORT);
@@ -212,18 +204,14 @@
 			    acpi_gbl_root_table_list.size *
 			    sizeof(struct acpi_table_desc));
 
-		if (acpi_gbl_root_table_list.flags & ACPI_TABLE_ORIGIN_MASK ==
-		    ACPI_TABLE_ORIGIN_ALLOCATED) {
+		if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
 			ACPI_FREE(acpi_gbl_root_table_list.tables);
 		}
 	}
 
 	acpi_gbl_root_table_list.tables = tables;
 	acpi_gbl_root_table_list.size += ACPI_ROOT_TABLE_SIZE_INCREMENT;
-	acpi_gbl_root_table_list.flags = (u8) (ACPI_TABLE_ORIGIN_ALLOCATED |
-					       (acpi_gbl_root_table_list.
-						flags &
-						~ACPI_TABLE_ORIGIN_MASK));
+	acpi_gbl_root_table_list.flags |= (u8) ACPI_ROOT_ORIGIN_ALLOCATED;
 
 	return_ACPI_STATUS(AE_OK);
 }
@@ -348,8 +336,7 @@
 	 * Delete the root table array if allocated locally. Array cannot be
 	 * mapped, so we don't need to check for that flag.
 	 */
-	if ((acpi_gbl_root_table_list.flags & ACPI_TABLE_ORIGIN_MASK) ==
-	    ACPI_TABLE_ORIGIN_ALLOCATED) {
+	if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
 		ACPI_FREE(acpi_gbl_root_table_list.tables);
 	}
 
@@ -497,7 +484,7 @@
 	if (table_index < acpi_gbl_root_table_list.count) {
 		is_loaded = (u8)
 		    (acpi_gbl_root_table_list.tables[table_index].
-		     flags & ACPI_TABLE_FLAGS_LOADED);
+		     flags & ACPI_TABLE_IS_LOADED);
 	}
 
 	(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
@@ -524,10 +511,10 @@
 	if (table_index < acpi_gbl_root_table_list.count) {
 		if (is_loaded) {
 			acpi_gbl_root_table_list.tables[table_index].flags |=
-			    ACPI_TABLE_FLAGS_LOADED;
+			    ACPI_TABLE_IS_LOADED;
 		} else {
 			acpi_gbl_root_table_list.tables[table_index].flags &=
-			    ~ACPI_TABLE_FLAGS_LOADED;
+			    ~ACPI_TABLE_IS_LOADED;
 		}
 	}