aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 1fcb8678665c..da1416af0c8b 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -965,8 +965,10 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
965 * D3hot is only valid if _PR3 present. 965 * D3hot is only valid if _PR3 present.
966 */ 966 */
967 if (ps->resources.count || 967 if (ps->resources.count ||
968 (ps->flags.explicit_set && i < ACPI_STATE_D3_HOT)) 968 (ps->flags.explicit_set && i < ACPI_STATE_D3_HOT)) {
969 ps->flags.valid = 1; 969 ps->flags.valid = 1;
970 ps->flags.os_accessible = 1;
971 }
970 972
971 ps->power = -1; /* Unknown - driver assigned */ 973 ps->power = -1; /* Unknown - driver assigned */
972 ps->latency = -1; /* Unknown - driver assigned */ 974 ps->latency = -1; /* Unknown - driver assigned */
@@ -982,6 +984,11 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
982 if (device->power.states[ACPI_STATE_D3_HOT].flags.explicit_set) 984 if (device->power.states[ACPI_STATE_D3_HOT].flags.explicit_set)
983 device->power.states[ACPI_STATE_D3_COLD].flags.explicit_set = 1; 985 device->power.states[ACPI_STATE_D3_COLD].flags.explicit_set = 1;
984 986
987 /* Presence of _PS3 or _PRx means we can put the device into D3 cold */
988 if (device->power.states[ACPI_STATE_D3_HOT].flags.explicit_set ||
989 device->power.flags.power_resources)
990 device->power.states[ACPI_STATE_D3_COLD].flags.os_accessible = 1;
991
985 acpi_bus_init_power(device); 992 acpi_bus_init_power(device);
986 993
987 return 0; 994 return 0;