patch-2.4.14 linux/drivers/acpi/utilities/utdelete.c
Next file: linux/drivers/acpi/utilities/uteval.c
Previous file: linux/drivers/acpi/utilities/utdebug.c
Back to the patch index
Back to the overall index
- Lines: 91
- Date:
Wed Oct 24 14:06:22 2001
- Orig file:
v2.4.13/linux/drivers/acpi/utilities/utdelete.c
- Orig date:
Sun Sep 23 11:40:57 2001
diff -u --recursive --new-file v2.4.13/linux/drivers/acpi/utilities/utdelete.c linux/drivers/acpi/utilities/utdelete.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utdelete - object deletion and reference count utilities
- * $Revision: 76 $
+ * $Revision: 81 $
*
******************************************************************************/
@@ -183,14 +183,10 @@
* Delete any allocated memory found above
*/
if (obj_pointer) {
- if (!acpi_tb_system_table_pointer (obj_pointer)) {
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Deleting Obj Ptr %p \n", obj_pointer));
-
- ACPI_MEM_FREE (obj_pointer);
- }
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Deleting Obj Ptr %p \n", obj_pointer));
+ ACPI_MEM_FREE (obj_pointer);
}
-
/* Only delete the object if it was dynamically allocated */
if (object->common.flags & AOPOBJ_STATIC_ALLOCATION) {
@@ -346,8 +342,8 @@
*/
if (count > MAX_REFERENCE_COUNT) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "**** AE_ERROR **** Invalid Reference Count (%X) in object %p\n\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_WARN,
+ "**** Warning **** Large Reference Count (%X) in object %p\n\n",
count, object));
}
@@ -408,11 +404,6 @@
return_ACPI_STATUS (AE_OK);
}
- if (acpi_tb_system_table_pointer (object)) {
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Object %p is Pcode Ptr\n", object));
- return_ACPI_STATUS (AE_OK);
- }
-
state = acpi_ut_create_update_state (object, action);
@@ -529,24 +520,9 @@
case ACPI_TYPE_REGION:
-
- /* TBD: [Investigate]
- Acpi_ut_update_ref_count (Object->Region.Addr_handler, Action);
- */
-/*
- Status =
- Acpi_ut_create_update_state_and_push (Object->Region.Addr_handler,
- Action, &State_list);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-*/
- break;
-
-
case INTERNAL_TYPE_REFERENCE:
+ /* No subobjects */
break;
}
@@ -625,6 +601,15 @@
FUNCTION_TRACE_PTR ("Ut_remove_reference", object);
+ /*
+ * Allow a NULL pointer to be passed in, just ignore it. This saves
+ * each caller from having to check. Also, ignore NS nodes.
+ *
+ */
+ if (!object ||
+ (VALID_DESCRIPTOR_TYPE (object, ACPI_DESC_TYPE_NAMED))) {
+ return_VOID;
+ }
/*
* Ensure that we have a valid object
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)