ACPI / PCI / PM: Fix device PM regression related to D3hot/D3cold
[linux-flexiantxendom0-3.2.10.git] / drivers / acpi / scan.c
index 7417267..85cbfdc 100644 (file)
@@ -908,6 +908,10 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
        device->power.states[ACPI_STATE_D3].flags.valid = 1;
        device->power.states[ACPI_STATE_D3].power = 0;
 
+       /* Set D3cold's explicit_set flag if _PS3 exists. */
+       if (device->power.states[ACPI_STATE_D3_HOT].flags.explicit_set)
+               device->power.states[ACPI_STATE_D3_COLD].flags.explicit_set = 1;
+
        acpi_bus_init_power(device);
 
        return 0;