[lkml]   [2013]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] ACPI / PM: Handle missing _PSC in acpi_bus_update_power()
From: Rafael J. Wysocki <>

If _PS0 is defined for an ACPI device node, but _PSC isn't and
the device node doesn't use power resources for power management,
acpi_bus_update_power() will fail to update the power state of it,
because acpi_device_get_power() returns ACPI_STATE_UNKNOWN in that

To handle that situation make acpi_bus_update_power() follow
acpi_bus_init_power() and try to force the given device node into
power state D0 if its actual power state cannot be determined.

Signed-off-by: Rafael J. Wysocki <>

On top of linux-pm.git/bleeding-edge.


drivers/acpi/device_pm.c | 3 +++
1 file changed, 3 insertions(+)

Index: linux-pm/drivers/acpi/device_pm.c
--- linux-pm.orig/drivers/acpi/device_pm.c
+++ linux-pm/drivers/acpi/device_pm.c
@@ -355,6 +355,9 @@ int acpi_bus_update_power(acpi_handle ha
if (result)
return result;

+ if (state == ACPI_STATE_UNKNOWN)
+ state = ACPI_STATE_D0;
result = acpi_device_set_power(device, state);
if (!result && state_p)
*state_p = state;

 \ /
  Last update: 2013-02-03 14:41    [W:2.336 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site