Skip to content

Commit

Permalink
ACPI / scan: Treat power resources in a special way
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Jan 7, 2013
1 parent e0ebda2 commit f95988d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,8 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl_not_used,
return AE_CTRL_DEPTH;
}

acpi_add_single_object(&device, handle, type, sta, false);
acpi_add_single_object(&device, handle, type, sta,
type == ACPI_BUS_TYPE_POWER);
if (!device)
return AE_CTRL_DEPTH;

Expand Down

0 comments on commit f95988d

Please sign in to comment.