Ejemplo n.º 1
0
acpi_status
acpi_get_possible_resources (
	acpi_handle                     device_handle,
	struct acpi_buffer              *ret_buffer)
{
	acpi_status                     status;


	ACPI_FUNCTION_TRACE ("acpi_get_possible_resources");


	/*
	 * Must have a valid handle and buffer, So we have to have a handle
	 * and a return buffer structure, and if there is a non-zero buffer length
	 * we also need a valid pointer in the buffer. If it's a zero buffer length,
	 * we'll be returning the needed buffer size, so keep going.
	 */
	if (!device_handle) {
		return_ACPI_STATUS (AE_BAD_PARAMETER);
	}

	status = acpi_ut_validate_buffer (ret_buffer);
	if (ACPI_FAILURE (status)) {
		return_ACPI_STATUS (status);
	}

	status = acpi_rs_get_prs_method_data (device_handle, ret_buffer);
	return_ACPI_STATUS (status);
}
Ejemplo n.º 2
0
ACPI_STATUS
acpi_get_possible_resources (
	ACPI_HANDLE             device_handle,
	ACPI_BUFFER             *ret_buffer)
{
	ACPI_STATUS             status;


	/*
	 *  Must have a valid handle and buffer, So we have to have a handle
	 *  and a return buffer structure, and if there is a non-zero buffer length
	 *  we also need a valid pointer in the buffer. If it's a zero buffer length,
	 *  we'll be returning the needed buffer size, so keep going.
	 */
	if ((!device_handle)        ||
		(!ret_buffer)           ||
		((ret_buffer->length) && (!ret_buffer->pointer)))
	{
		return (AE_BAD_PARAMETER);
   }

	status = acpi_rs_get_prs_method_data (device_handle, ret_buffer);

	return (status);
}
Ejemplo n.º 3
0
/*******************************************************************************
 *
 * FUNCTION:    acpi_get_possible_resources
 *
 * PARAMETERS:  device_handle   - Handle to the device object for the
 *                                device we are querying
 *              ret_buffer      - Pointer to a buffer to receive the
 *                                resources for the device
 *
 * RETURN:      Status
 *
 * DESCRIPTION: This function is called to get a list of the possible resources
 *              for a specific device. The caller must first acquire a handle
 *              for the desired device. The resource data is placed in the
 *              buffer pointed to by the ret_buffer variable.
 *
 *              If the function fails an appropriate status will be returned
 *              and the value of ret_buffer is undefined.
 *
 ******************************************************************************/
acpi_status
acpi_get_possible_resources(acpi_handle device_handle,
			    struct acpi_buffer *ret_buffer)
{
	acpi_status status;
	struct acpi_namespace_node *node;

	ACPI_FUNCTION_TRACE(acpi_get_possible_resources);

	/* Validate parameters then dispatch to internal routine */

	status = acpi_rs_validate_parameters(device_handle, ret_buffer, &node);
	if (ACPI_FAILURE(status)) {
		return_ACPI_STATUS(status);
	}

	status = acpi_rs_get_prs_method_data(node, ret_buffer);
	return_ACPI_STATUS(status);
}