ACPI: Add _OST support for sysfs eject
authorToshi Kani <toshi.kani@hp.com>
Thu, 24 May 2012 02:25:20 +0000 (20:25 -0600)
committerLen Brown <len.brown@intel.com>
Mon, 4 Jun 2012 05:09:19 +0000 (01:09 -0400)
commitc4753e57b78b213f2384fa0dbafa348b087114fa
tree045c893416303dd0a3ea191848597ad401a48e5c
parent275c58d77062bbb85dbeb3843ba04f34aa50cf8e
ACPI: Add _OST support for sysfs eject

Changed acpi_bus_hot_remove_device() to support _OST. This function is
also changed to global so that it can be called from hotplug notify
handlers to perform hot-remove operation.

Changed acpi_eject_store(), which is the sysfs eject handler. It checks
eject_pending to see if the request was originated from ACPI eject
notification. If not, it calls _OST(0x103,84,) per Figure 6-37 in ACPI
5.0 spec.

Added eject_pending bit to acpi_device_flags. This bit is set when the
kernel has received an ACPI eject notification, but does not initiate
its hot-remove operation by itself.

Added struct acpi_eject_event. This structure is used to pass extended
information to acpi_bus_hot_remove_device(), which has a single argument
to support asynchronous call

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/scan.c
include/acpi/acpi_bus.h