]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / scan: Full transition to D3cold in acpi_device_unregister()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 9 Feb 2013 14:29:20 +0000 (15:29 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 13 Feb 2013 12:46:38 +0000 (13:46 +0100)
commit191bda990be727669495676ea61fb90605b2bcfa
tree15203990a9ffa34a5d51078702dc77c17d8c9855
parent5f9721c6e6b91bd2ae2c0f731719159d38eb327d
ACPI / scan: Full transition to D3cold in acpi_device_unregister()

In order to drop reference counts of all power resources used by an
ACPI device node being removed, acpi_device_unregister() calls
acpi_power_transition(device, ACPI_STATE_D3_COLD), which effectively
transitions the device node into D3cold if it uses any power
resources.  However, for some device nodes it may not be appropriate
to remove power from them entirely before putting them into D3hot
before.  On the other hand, executing _PS3 for devices that don't
use power resources before removing them shouldn't really hurt.
In fact, that is done by acpi_bus_hot_remove_device(), but this is
not the right place to do it, because the bus trimming may have
caused power to be removed from the device node in question already
before.

For these reasons, make acpi_device_unregister() carry out full
power-off transition for all device nodes supporting that and remove
the direct evaluation of _PS3 from acpi_bus_hot_remove_device().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c