aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-07 15:17:02 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-07 15:17:02 -0500
commitf95988de06ea62ef5bd861f06e9ef56cea405ed1 (patch)
tree19ad6adead071b2812f5f8c702cd415c4bcb2b04
parente0ebda2ee12c261fb2f2d7abf21489b93d9caa4e (diff)
ACPI / scan: Treat power resources in a special way
Commit 805d410 (ACPI: Separate adding ACPI device objects from probing ACPI drivers) introduced an ACPI power resources management regression, because it didn't ensure that the power resources driver bind to the struct acpi_device objects corresponding to power resources as soon as they were created. As a result, ACPI power management routines may attempt to access power resource objects before they are ready to use. To fix this problem, tell the acpi_add_single_object() in acpi_bus_check_add() to probe the driver for objects of type ACPI_BUS_TYPE_POWER. This fix has been verified to work on HP nx6325 where the problem was first observed. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Toshi Kani <toshi.kani@hp.com>
-rw-r--r--drivers/acpi/scan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index f8a0d0f7d197..e380345b643a 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1558,7 +1558,8 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl_not_used,
1558 return AE_CTRL_DEPTH; 1558 return AE_CTRL_DEPTH;
1559 } 1559 }
1560 1560
1561 acpi_add_single_object(&device, handle, type, sta, false); 1561 acpi_add_single_object(&device, handle, type, sta,
1562 type == ACPI_BUS_TYPE_POWER);
1562 if (!device) 1563 if (!device)
1563 return AE_CTRL_DEPTH; 1564 return AE_CTRL_DEPTH;
1564 1565