ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Object %p is NS handle\n", object)); 
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Object %p is NS handle\n", object)); 
acpi_ut_update_object_reference (	union acpi_operand_object       *object,	u16                             action){	acpi_status                     status;	u32                             i;	union acpi_generic_state         *state_list = NULL;	union acpi_generic_state         *state;	union acpi_operand_object        *tmp;	ACPI_FUNCTION_TRACE_PTR ("ut_update_object_reference", object);	/* Ignore a null object ptr */	if (!object) {		return_ACPI_STATUS (AE_OK);	}	/* Make sure that this isn't a namespace handle */	if (ACPI_GET_DESCRIPTOR_TYPE (object) == ACPI_DESC_TYPE_NAMED) {		ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Object %p is NS handle\n", object));		return_ACPI_STATUS (AE_OK);	}	state = acpi_ut_create_update_state (object, action);	while (state) {		object = state->update.object;		action = state->update.value;		acpi_ut_delete_generic_state (state);		/*		 * All sub-objects must have their reference count incremented also.		 * Different object types have different subobjects.		 */		switch (ACPI_GET_OBJECT_TYPE (object)) {		case ACPI_TYPE_DEVICE:			tmp = object->device.system_notify;			if (tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)				object->device.system_notify = NULL;			acpi_ut_update_ref_count (tmp, action);			tmp = object->device.device_notify;			if (tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT)				object->device.device_notify = NULL;			acpi_ut_update_ref_count (tmp, action);			break;		case ACPI_TYPE_PACKAGE:			/*			 * We must update all the sub-objects of the package			 * (Each of whom may have their own sub-objects, etc.			 */			for (i = 0; i < object->package.count; i++) {				/*				 * Push each element onto the stack for later processing.				 * Note: There can be null elements within the package,				 * these are simply ignored				 */				status = acpi_ut_create_update_state_and_push (						 object->package.elements[i], action, &state_list);				if (ACPI_FAILURE (status)) {					goto error_exit;				}				tmp = object->package.elements[i];				if (tmp && (tmp->common.reference_count <= 1)  && action == REF_DECREMENT)					object->package.elements[i] = NULL;			}			break;		case ACPI_TYPE_BUFFER_FIELD:			status = acpi_ut_create_update_state_and_push (					 object->buffer_field.buffer_obj, action, &state_list);			if (ACPI_FAILURE (status)) {				goto error_exit;			}			tmp = object->buffer_field.buffer_obj;			if ( tmp && (tmp->common.reference_count <= 1)  && action == REF_DECREMENT)				object->buffer_field.buffer_obj = NULL;			break;		case ACPI_TYPE_LOCAL_REGION_FIELD:			status = acpi_ut_create_update_state_and_push (					 object->field.region_obj, action, &state_list);			if (ACPI_FAILURE (status)) {				goto error_exit;			}			tmp = object->field.region_obj;			if ( tmp && (tmp->common.reference_count <= 1)  && action == REF_DECREMENT)				object->field.region_obj = NULL;		   break;		case ACPI_TYPE_LOCAL_BANK_FIELD:			status = acpi_ut_create_update_state_and_push (					 object->bank_field.bank_obj, action, &state_list);			if (ACPI_FAILURE (status)) {				goto error_exit;			}			tmp = object->bank_field.bank_obj;			if ( tmp && (tmp->common.reference_count <= 1)  && action == REF_DECREMENT)				object->bank_field.bank_obj = NULL;			status = acpi_ut_create_update_state_and_push (					 object->bank_field.region_obj, action, &state_list);			if (ACPI_FAILURE (status)) {				goto error_exit;			}			tmp = object->bank_field.region_obj;			if ( tmp && (tmp->common.reference_count <= 1)  && action == REF_DECREMENT)				object->bank_field.region_obj = NULL;			break;		case ACPI_TYPE_LOCAL_INDEX_FIELD:			status = acpi_ut_create_update_state_and_push (					 object->index_field.index_obj, action, &state_list);			if (ACPI_FAILURE (status)) {				goto error_exit;			}			tmp = object->index_field.index_obj;			if ( tmp && (tmp->common.reference_count <= 1)  && action == REF_DECREMENT)				object->index_field.index_obj = NULL;			status = acpi_ut_create_update_state_and_push (					 object->index_field.data_obj, action, &state_list);			if (ACPI_FAILURE (status)) {				goto error_exit;			}			tmp = object->index_field.data_obj;			if ( tmp && (tmp->common.reference_count <= 1)  && action == REF_DECREMENT)				object->index_field.data_obj = NULL;			break;		case ACPI_TYPE_LOCAL_REFERENCE:			/*			 * The target of an Index (a package, string, or buffer) must track			 * changes to the ref count of the index.			 */			if (object->reference.opcode == AML_INDEX_OP) {				status = acpi_ut_create_update_state_and_push (						 object->reference.object, action, &state_list);				if (ACPI_FAILURE (status)) {					goto error_exit;				}			}			break;		case ACPI_TYPE_REGION:		default:			/* No subobjects */			break;		}		/*		 * Now we can update the count in the main object.  This can only		 * happen after we update the sub-objects in case this causes the		 * main object to be deleted.		 */		acpi_ut_update_ref_count (object, action);		/* Move on to the next object to be updated */		state = acpi_ut_pop_generic_state (&state_list);	}	return_ACPI_STATUS (AE_OK);error_exit:	ACPI_REPORT_ERROR (("Could not update object reference count, %s\n",		acpi_format_exception (status)));	return_ACPI_STATUS (status);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/44f6c01242da4e162f28d8e1216a8c7a91174605/utdelete.c/buggy/drivers/acpi/utilities/utdelete.c