View | Details | Raw Unified
Collapse All | Expand All

(-) a/drivers/acpi/namespace/nsxfeval.c (-21 / +25 lines)
 Lines 110-115   acpi_evaluate_object_typed(acpi_handle h Link Here 
	}
	}
	if (return_buffer->length == 0) {
	if (return_buffer->length == 0) {
		/* Error because caller specifically asked for a return value */
		/* Error because caller specifically asked for a return value */
		ACPI_ERROR((AE_INFO, "No return value"));
		ACPI_ERROR((AE_INFO, "No return value"));
 Lines 131-136   acpi_evaluate_object_typed(acpi_handle h Link Here 
		    acpi_ut_get_type_name(return_type)));
		    acpi_ut_get_type_name(return_type)));
	if (must_free) {
	if (must_free) {
		/* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */
		/* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */
		acpi_os_free(return_buffer->pointer);
		acpi_os_free(return_buffer->pointer);
 Lines 224-232   acpi_evaluate_object(acpi_handle handle, Link Here 
	 * 3) Valid handle
	 * 3) Valid handle
	 */
	 */
	if ((pathname) && (acpi_ns_valid_root_prefix(pathname[0]))) {
	if ((pathname) && (acpi_ns_valid_root_prefix(pathname[0]))) {
		/*
		 *  The path is fully qualified, just evaluate by name
		/* The path is fully qualified, just evaluate by name */
		 */
		status = acpi_ns_evaluate_by_name(pathname, &info);
		status = acpi_ns_evaluate_by_name(pathname, &info);
	} else if (!handle) {
	} else if (!handle) {
		/*
		/*
 Lines 235-245   acpi_evaluate_object(acpi_handle handle, Link Here 
		 * qualified names above, this is an error
		 * qualified names above, this is an error
		 */
		 */
		if (!pathname) {
		if (!pathname) {
			ACPI_ERROR((AE_INFO,
			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
				    "Both Handle and Pathname are NULL"));
					  "Both Handle and Pathname are NULL"));
		} else {
		} else {
			ACPI_ERROR((AE_INFO,
			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
				    "Handle is NULL and Pathname is relative"));
					  "Null Handle with relative pathname [%s]",
					  pathname));
		}
		}
		status = AE_BAD_PARAMETER;
		status = AE_BAD_PARAMETER;
 Lines 256-264   acpi_evaluate_object(acpi_handle handle, Link Here 
			 */
			 */
			status = acpi_ns_evaluate_by_handle(&info);
			status = acpi_ns_evaluate_by_handle(&info);
		} else {
		} else {
			/*
			/* Both a Handle and a relative Pathname */
			 * Both a Handle and a relative Pathname
			 */
			status = acpi_ns_evaluate_relative(pathname, &info);
			status = acpi_ns_evaluate_relative(pathname, &info);
		}
		}
	}
	}
 Lines 295-300   acpi_evaluate_object(acpi_handle handle, Link Here 
				    acpi_ut_get_object_size(info.return_object,
				    acpi_ut_get_object_size(info.return_object,
							    &buffer_space_needed);
							    &buffer_space_needed);
				if (ACPI_SUCCESS(status)) {
				if (ACPI_SUCCESS(status)) {
					/* Validate/Allocate/Clear caller buffer */
					/* Validate/Allocate/Clear caller buffer */
					status =
					status =
 Lines 303-309   acpi_evaluate_object(acpi_handle handle, Link Here 
					     buffer_space_needed);
					     buffer_space_needed);
					if (ACPI_FAILURE(status)) {
					if (ACPI_FAILURE(status)) {
						/*
						/*
						 * Caller's buffer is too small or a new one can't be allocated
						 * Caller's buffer is too small or a new one can't
						 * be allocated
						 */
						 */
						ACPI_DEBUG_PRINT((ACPI_DB_INFO,
						ACPI_DEBUG_PRINT((ACPI_DB_INFO,
								  "Needed buffer size %X, %s\n",
								  "Needed buffer size %X, %s\n",
 Lines 312-320   acpi_evaluate_object(acpi_handle handle, Link Here 
								  acpi_format_exception
								  acpi_format_exception
								  (status)));
								  (status)));
					} else {
					} else {
						/*
						/* We have enough space for the object, build it */
						 *  We have enough space for the object, build it
						 */
						status =
						status =
						    acpi_ut_copy_iobject_to_eobject
						    acpi_ut_copy_iobject_to_eobject
						    (info.return_object,
						    (info.return_object,
 Lines 341-350   acpi_evaluate_object(acpi_handle handle, Link Here 
		}
		}
	}
	}
	/*
	/* Free the input parameter list (if we created one) */
	 * Free the input parameter list (if we created one),
	 */
	if (info.parameters) {
	if (info.parameters) {
		/* Free the allocated parameter block */
		/* Free the allocated parameter block */
		acpi_ut_delete_internal_object_list(info.parameters);
		acpi_ut_delete_internal_object_list(info.parameters);
 Lines 473-478   acpi_ns_get_device_callback(acpi_handle Link Here 
	}
	}
	if (!(flags & ACPI_STA_DEVICE_PRESENT)) {
	if (!(flags & ACPI_STA_DEVICE_PRESENT)) {
		/* Don't examine children of the device if not present */
		/* Don't examine children of the device if not present */
		return (AE_CTRL_DEPTH);
		return (AE_CTRL_DEPTH);
 Lines 489-494   acpi_ns_get_device_callback(acpi_handle Link Here 
		}
		}
		if (ACPI_STRNCMP(hid.value, info->hid, sizeof(hid.value)) != 0) {
		if (ACPI_STRNCMP(hid.value, info->hid, sizeof(hid.value)) != 0) {
			/* Get the list of Compatible IDs */
			/* Get the list of Compatible IDs */
			status = acpi_ut_execute_CID(node, &cid);
			status = acpi_ut_execute_CID(node, &cid);
 Lines 563-571   acpi_get_devices(char *HID, Link Here 
	 * We're going to call their callback from OUR callback, so we need
	 * We're going to call their callback from OUR callback, so we need
	 * to know what it is, and their context parameter.
	 * to know what it is, and their context parameter.
	 */
	 */
	info.hid = HID;
	info.context = context;
	info.context = context;
	info.user_function = user_function;
	info.user_function = user_function;
	info.hid = HID;
	/*
	/*
	 * Lock the namespace around the walk.
	 * Lock the namespace around the walk.
 Lines 578-586   acpi_get_devices(char *HID, Link Here 
		return_ACPI_STATUS(status);
		return_ACPI_STATUS(status);
	}
	}
	status = acpi_ns_walk_namespace(ACPI_TYPE_DEVICE,
	status = acpi_ns_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
					ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
					ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK,
					ACPI_NS_WALK_UNLOCK,
					acpi_ns_get_device_callback, &info,
					acpi_ns_get_device_callback, &info,
					return_value);
					return_value);