ACPI / PM: Rework device power management to follow ACPI 6
[firefly-linux-kernel-4.4.55.git] / drivers / acpi / fan.c
index 7a36f02598a6f20db9fe2a78c61a0f8fbafe6ecb..bea0bbaafa979dd998d71695c62ac3366bd48e43 100644 (file)
@@ -158,8 +158,9 @@ static int fan_get_state(struct acpi_device *device, unsigned long *state)
        if (result)
                return result;
 
-       *state = (acpi_state == ACPI_STATE_D3_COLD ? 0 :
-                (acpi_state == ACPI_STATE_D0 ? 1 : -1));
+       *state = acpi_state == ACPI_STATE_D3_COLD
+                       || acpi_state == ACPI_STATE_D3_HOT ?
+               0 : (acpi_state == ACPI_STATE_D0 ? 1 : -1);
        return 0;
 }