]> git.karo-electronics.de Git - mv-sheeva.git/commit
ACPI / PM: Register power resource devices as soon as they are needed
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 24 Nov 2010 23:10:44 +0000 (00:10 +0100)
committerLen Brown <len.brown@intel.com>
Wed, 12 Jan 2011 09:48:45 +0000 (04:48 -0500)
commitbf325f9538d8c89312be305b9779edbcb436af00
treefee681d8bf0c0058450b34a325bb60c5f02994aa
parent97d9a9e9f5ee68f20005ca5aa77c6b684e7cace8
ACPI / PM: Register power resource devices as soon as they are needed

Depending on the organization of the ACPI namespace, power resource
device objects may generally be scanned after the "regular" device
objects that they are referred from through _PRn.  This, in turn, may
cause acpi_bus_get_power_flags() to attempt to access them through
acpi_bus_init_power() before they are registered (and initialized by
acpi_power_driver).  [This is not a theoretical issue, it actually
happens for one PnP device on my testbed HP nx6325.]

To fix this problem, make acpi_bus_get_power_flags() attempt to
register power resource devices as soon as they have been found in
the _PRn output for any other devices.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/scan.c