summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/device_pm.c6
-rw-r--r--drivers/acpi/scan.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index 3ef075b71870..164d609d7c9e 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -330,6 +330,12 @@ int acpi_bus_init_power(struct acpi_device *device)
result = acpi_dev_pm_explicit_set(device, state);
if (result)
return result;
+ } else if (state == ACPI_STATE_UNKNOWN) {
+ /* No power resources and missing _PSC? Try to force D0. */
+ state = ACPI_STATE_D0;
+ result = acpi_dev_pm_explicit_set(device, state);
+ if (result)
+ return result;
}
device->power.state = state;
return 0;
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 9801837876b7..f75f25c2e455 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1180,7 +1180,10 @@ static void acpi_bus_get_power_flags(struct acpi_device *device)
device->power.flags.power_resources)
device->power.states[ACPI_STATE_D3_COLD].flags.os_accessible = 1;
- acpi_bus_init_power(device);
+ if (acpi_bus_init_power(device)) {
+ acpi_free_power_resources_lists(device);
+ device->flags.power_manageable = 0;
+ }
}
static void acpi_bus_get_flags(struct acpi_device *device)