else if (active->flags.enabled) { for (j = 0; j < active->devices.count; j++) { result = acpi_bus_set_power(active->devices. handles[j], ACPI_STATE_D3); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Unable to turn cooling device [%p] 'off'\n", active->devices. handles[j])); continue; } active->flags.enabled = 0; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Cooling device [%p] now 'off'\n", 
for (j = 0; j < active->devices.count; j++) { result = acpi_bus_set_power(active->devices.handles[j], ACPI_STATE_D3); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Unable to turn cooling device [%p] 'off'\n", 
static int acpi_thermal_active(struct acpi_thermal *tz){	int result = 0;	struct acpi_thermal_active *active = NULL;	int i = 0;	int j = 0;	unsigned long maxtemp = 0;	ACPI_FUNCTION_TRACE("acpi_thermal_active");	if (!tz)		return_VALUE(-EINVAL);	for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {		active = &(tz->trips.active[i]);		if (!active || !active->flags.valid)			break;		/*		 * Above Threshold?		 * ----------------		 * If not already enabled, turn ON all cooling devices		 * associated with this active threshold.		 */		if (tz->temperature >= active->temperature) {			if (active->temperature > maxtemp)				tz->state.active_index = i, maxtemp =				    active->temperature;			if (!active->flags.enabled) {				for (j = 0; j < active->devices.count; j++) {					result =					    acpi_bus_set_power(active->devices.							       handles[j],							       ACPI_STATE_D0);					if (result) {						ACPI_DEBUG_PRINT((ACPI_DB_WARN,								  "Unable to turn cooling device [%p] 'on'\n",								  active->								  devices.								  handles[j]));						continue;					}					active->flags.enabled = 1;					ACPI_DEBUG_PRINT((ACPI_DB_INFO,							  "Cooling device [%p] now 'on'\n",							  active->devices.							  handles[j]));				}			}		}		/*		 * Below Threshold?		 * ----------------		 * Turn OFF all cooling devices associated with this		 * threshold.		 */		else if (active->flags.enabled) {			for (j = 0; j < active->devices.count; j++) {				result =				    acpi_bus_set_power(active->devices.						       handles[j],						       ACPI_STATE_D3);				if (result) {					ACPI_DEBUG_PRINT((ACPI_DB_WARN,							  "Unable to turn cooling device [%p] 'off'\n",							  active->devices.							  handles[j]));					continue;				}				active->flags.enabled = 0;				ACPI_DEBUG_PRINT((ACPI_DB_INFO,						  "Cooling device [%p] now 'off'\n",						  active->devices.handles[j]));			}		}	}	return_VALUE(0);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1cbf4c563c0eaaf11c552a88b374e213181c6ddd/thermal.c/buggy/drivers/acpi/thermal.c