ACPI: Update _OST handling for notify
authorToshi Kani <toshi.kani@hp.com>
Tue, 5 Mar 2013 22:33:31 +0000 (22:33 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 24 Mar 2013 22:49:39 +0000 (23:49 +0100)
commit2cbb14fb7065b0cc08ef03ee69dce93d65197c29
treef9b78ce0eb9b4e708983befe3c14baf366d65491
parent6b772e8f9e9deb3528402ac14fd0aa186d84ae75
ACPI: Update _OST handling for notify

When the kernel calls _OSC with OSC_SB_HOTPLUG_OST_SUPPORT bit
set at boot-time, the OS is responsible for calling _OST for
ACPI hotplug events.  However, when hotplug.enabled attribute
is unset for ACPI scan drivers, their notify handlers are removed
and _OST is not called for ACPI hotplug events as a result.

This patch keeps the notify handler of ACPI scan drivers,
acpi_hotplug_notify_cb(), installed regardless of the state of
hotplug.enabled.  The notify handler then checks if hotplug.enabled
is set for the associated scan handler.  If unset, the notify
handler calls _OST with a proper error code.  The patch also
eliminates ACPI namespace walk when hotplug.enabled is changed
via sysfs.

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