summaryrefslogtreecommitdiff
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-09-22 00:48:01 +0400
committerTony Lindgren <tony@atomide.com>2012-09-22 00:48:01 +0400
commit0c9de3c52d2baed6bc2ee44885adb418152c71c4 (patch)
treee19ab2c41ae47250fd614418022b32aa783aa563 /drivers/acpi/bus.c
parent6bfc82ff589a00e5fbc12b958c649d703d273c86 (diff)
parent3c7c5dab44d6c8861bc86dab924353d8d40344f8 (diff)
downloadlinux-0c9de3c52d2baed6bc2ee44885adb418152c71c4.tar.xz
Merge branch 'for_3.7/omap5_arch_timer' of git://github.com/SantoshShilimkar/linux into devel-dt-arch-timer
Conflicts: arch/arm/mach-omap2/timer.c
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r--drivers/acpi/bus.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 9628652e080c..e0596954290b 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -237,6 +237,16 @@ static int __acpi_bus_get_power(struct acpi_device *device, int *state)
} else if (result == ACPI_STATE_D3_HOT) {
result = ACPI_STATE_D3;
}
+
+ /*
+ * If we were unsure about the device parent's power state up to this
+ * point, the fact that the device is in D0 implies that the parent has
+ * to be in D0 too.
+ */
+ if (device->parent && device->parent->power.state == ACPI_STATE_UNKNOWN
+ && result == ACPI_STATE_D0)
+ device->parent->power.state = ACPI_STATE_D0;
+
*state = result;
out: