/* GTHS returning 'n' would mean that  states are supported In that case max_cstate would be n-1 GTHS returning '0' would mean that no bandwidth control states are supported  */
static int memory_get_max_bandwidth(struct thermal_cooling_device *cdev, unsigned long *max_state)
/* GTHS returning 'n' would mean that  states are supported In that case max_cstate would be n-1 GTHS returning '0' would mean that no bandwidth control states are supported  */
static int memory_get_max_bandwidth(struct thermal_cooling_device *cdev, unsigned long *max_state)
{
	struct acpi_device *device = cdev->devdata;
	acpi_handle handle = device->handle;
	unsigned long long value;
	struct acpi_object_list arg_list;
	union acpi_object arg;
	acpi_status status = AE_OK;
	arg_list.count = 1;
	arg_list.pointer = &arg;
	arg.type = ACPI_TYPE_INTEGER;
	arg.integer.value = MEMORY_ARG_MAX_BANDWIDTH;
	status = acpi_evaluate_integer(handle, MEMORY_GET_BANDWIDTH,
				       &arg_list, &value);
	if (ACPI_FAILURE(status))
		return -EFAULT;
	if (!value)
		return -EINVAL;
	*max_state = value - 1;
	return 0;
}