ACPI / Fan: Rework the handling of power resources
Use the new function acpi_bus_update_power() for manipulating power resources used by ACPI fan devices, which allows them to be put into the right state during initialization and resume. Consequently, remove the flags.force_power_state field from struct acpi_device, which is not necessary any more. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
committed by
Len Brown
parent
bf325f9538
commit
488a76c526
@@ -1059,8 +1059,9 @@ static int acpi_thermal_resume(struct acpi_device *device)
|
||||
break;
|
||||
tz->trips.active[i].flags.enabled = 1;
|
||||
for (j = 0; j < tz->trips.active[i].devices.count; j++) {
|
||||
result = acpi_bus_get_power(tz->trips.active[i].devices.
|
||||
handles[j], &power_state);
|
||||
result = acpi_bus_update_power(
|
||||
tz->trips.active[i].devices.handles[j],
|
||||
&power_state);
|
||||
if (result || (power_state != ACPI_STATE_D0)) {
|
||||
tz->trips.active[i].flags.enabled = 0;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user