diff options
Diffstat (limited to 'drivers/acpi/device_pm.c')
-rw-r--r-- | drivers/acpi/device_pm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index a94383d1f350..d42b2fb5a7e9 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c | |||
@@ -118,9 +118,10 @@ int acpi_device_get_power(struct acpi_device *device, int *state) | |||
118 | /* | 118 | /* |
119 | * If we were unsure about the device parent's power state up to this | 119 | * If we were unsure about the device parent's power state up to this |
120 | * point, the fact that the device is in D0 implies that the parent has | 120 | * point, the fact that the device is in D0 implies that the parent has |
121 | * to be in D0 too. | 121 | * to be in D0 too, except if ignore_parent is set. |
122 | */ | 122 | */ |
123 | if (device->parent && device->parent->power.state == ACPI_STATE_UNKNOWN | 123 | if (!device->power.flags.ignore_parent && device->parent |
124 | && device->parent->power.state == ACPI_STATE_UNKNOWN | ||
124 | && result == ACPI_STATE_D0) | 125 | && result == ACPI_STATE_D0) |
125 | device->parent->power.state = ACPI_STATE_D0; | 126 | device->parent->power.state = ACPI_STATE_D0; |
126 | 127 | ||
@@ -177,7 +178,8 @@ int acpi_device_set_power(struct acpi_device *device, int state) | |||
177 | acpi_power_state_string(state)); | 178 | acpi_power_state_string(state)); |
178 | return -ENODEV; | 179 | return -ENODEV; |
179 | } | 180 | } |
180 | if (device->parent && (state < device->parent->power.state)) { | 181 | if (!device->power.flags.ignore_parent && |
182 | device->parent && (state < device->parent->power.state)) { | ||
181 | dev_warn(&device->dev, | 183 | dev_warn(&device->dev, |
182 | "Cannot transition to power state %s for parent in %s\n", | 184 | "Cannot transition to power state %s for parent in %s\n", |
183 | acpi_power_state_string(state), | 185 | acpi_power_state_string(state), |