summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-22 00:48:31 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-22 00:48:31 +0100
commit5d5132059a1f652de9dc2d62a8ff15561e648d11 (patch)
tree50b8d40bcdc23aa66a64db90c733160a0e565867 /drivers/acpi/scan.c
parentACPI / dock: Add .uevent() callback to struct acpi_hotplug_context (diff)
downloadlinux-5d5132059a1f652de9dc2d62a8ff15561e648d11.tar.xz
linux-5d5132059a1f652de9dc2d62a8ff15561e648d11.zip
ACPI / ATA: Add hotplug contexts to ACPI companions of SATA devices
Modify the SATA subsystem to add hotplug contexts to ACPI companions of SATA devices and ports instead of registering special ACPI dock operations using register_hotplug_dock_device(). That change will allow the entire code handling those special ACPI dock operations to be dropped in the next commit. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index e7d951032f85..f6bcc24f73dc 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -71,6 +71,17 @@ void acpi_unlock_hp_context(void)
mutex_unlock(&acpi_hp_context_lock);
}
+void acpi_initialize_hp_context(struct acpi_device *adev,
+ struct acpi_hotplug_context *hp,
+ int (*notify)(struct acpi_device *, u32),
+ void (*uevent)(struct acpi_device *, u32))
+{
+ acpi_lock_hp_context();
+ acpi_set_hp_context(adev, hp, notify, uevent, NULL);
+ acpi_unlock_hp_context();
+}
+EXPORT_SYMBOL_GPL(acpi_initialize_hp_context);
+
int acpi_scan_add_handler(struct acpi_scan_handler *handler)
{
if (!handler || !handler->attach)