void acpi_tb_delete_acpi_tables (void) { acpi_table_type type; /* * Free memory allocated for ACPI tables * Memory can either be mapped or allocated */ for (type = 0; type < NUM_ACPI_TABLES; type++) { acpi_tb_delete_acpi_table (type); } }
acpi_status acpi_unload_table ( acpi_table_type table_type) { acpi_table_desc *list_head; FUNCTION_TRACE ("Acpi_unload_table"); /* Parameter validation */ if (table_type > ACPI_TABLE_MAX) { return_ACPI_STATUS (AE_BAD_PARAMETER); } /* Find all tables of the requested type */ list_head = &acpi_gbl_acpi_tables[table_type]; do { /* * Delete all namespace entries owned by this table. Note that these * entries can appear anywhere in the namespace by virtue of the AML * "Scope" operator. Thus, we need to track ownership by an ID, not * simply a position within the hierarchy */ acpi_ns_delete_namespace_by_owner (list_head->table_id); /* Delete (or unmap) the actual table */ acpi_tb_delete_acpi_table (table_type); } while (list_head != &acpi_gbl_acpi_tables[table_type]); return_ACPI_STATUS (AE_OK); }