acpi_status acpi_get_current_resources ( acpi_handle device_handle, struct acpi_buffer *ret_buffer) { acpi_status status; ACPI_FUNCTION_TRACE ("acpi_get_current_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_crs_method_data (device_handle, ret_buffer); return_ACPI_STATUS (status); }
ACPI_STATUS acpi_get_current_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_crs_method_data (device_handle, ret_buffer); return (status); }
/******************************************************************************* * * FUNCTION: acpi_get_current_resources * * PARAMETERS: device_handle - Handle to the device object for the * device we are querying * ret_buffer - Pointer to a buffer to receive the * current resources for the device * * RETURN: Status * * DESCRIPTION: This function is called to get the current 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 parameter. * * If the function fails an appropriate status will be returned * and the value of ret_buffer is undefined. * * This function attempts to execute the _CRS method contained in * the object indicated by the passed device_handle. * ******************************************************************************/ acpi_status acpi_get_current_resources(acpi_handle device_handle, struct acpi_buffer *ret_buffer) { acpi_status status; struct acpi_namespace_node *node; ACPI_FUNCTION_TRACE(acpi_get_current_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_crs_method_data(node, ret_buffer); return_ACPI_STATUS(status); }