Пример #1
0
/*******************************************************************************
 *
 * FUNCTION:    acpi_set_current_resources
 *
 * PARAMETERS:  device_handle   - Handle to the device object for the
 *                                device we are setting resources
 *              in_buffer       - Pointer to a buffer containing the
 *                                resources to be set for the device
 *
 * RETURN:      Status
 *
 * DESCRIPTION: This function is called to set the current resources for a
 *              specific device. The caller must first acquire a handle for
 *              the desired device. The resource data is passed to the routine
 *              the buffer pointed to by the in_buffer variable.
 *
 ******************************************************************************/
acpi_status
acpi_set_current_resources(acpi_handle device_handle,
			   struct acpi_buffer *in_buffer)
{
	acpi_status status;
	struct acpi_namespace_node *node;

	ACPI_FUNCTION_TRACE(acpi_set_current_resources);

	/* Validate the buffer, don't allow zero length */

	if ((!in_buffer) || (!in_buffer->pointer) || (!in_buffer->length)) {
		return_ACPI_STATUS(AE_BAD_PARAMETER);
	}

	/* Validate parameters then dispatch to internal routine */

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

	status = acpi_rs_set_srs_method_data(node, in_buffer);
	return_ACPI_STATUS(status);
}
Пример #2
0
ACPI_STATUS
acpi_set_current_resources (
	ACPI_HANDLE             device_handle,
	ACPI_BUFFER             *in_buffer)
{
	ACPI_STATUS             status;


	/*
	 *  Must have a valid handle and buffer
	 */
	if ((!device_handle)      ||
		(!in_buffer)          ||
		(!in_buffer->pointer) ||
		(!in_buffer->length))
	{
		return (AE_BAD_PARAMETER);
	}

	status = acpi_rs_set_srs_method_data (device_handle, in_buffer);

	return (status);
}
Пример #3
0
acpi_status
acpi_set_current_resources (
	acpi_handle                     device_handle,
	struct acpi_buffer              *in_buffer)
{
	acpi_status                     status;


	ACPI_FUNCTION_TRACE ("acpi_set_current_resources");


	/*
	 * Must have a valid handle and buffer
	 */
	if ((!device_handle)      ||
		(!in_buffer)          ||
		(!in_buffer->pointer) ||
		(!in_buffer->length)) {
		return_ACPI_STATUS (AE_BAD_PARAMETER);
	}

	status = acpi_rs_set_srs_method_data (device_handle, in_buffer);
	return_ACPI_STATUS (status);
}