From be27b3dcb02335ec093b81053fc8c84b32d3106e Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Fri, 21 Feb 2014 01:10:27 +0100 Subject: ACPI / dock: Add .uevent() callback to struct acpi_hotplug_context In order to avoid the need to register special ACPI dock operations for SATA devices add a .uevent() callback pointer to struct acpi_hotplug_context and make dock_hotplug_event() use that callback if available. Also rename the existing .event() callback in struct acpi_hotplug_context to .notify() to avoid possible confusion in the future. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/dock.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'drivers/acpi/dock.c') diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 78c4ee7a422e..a88fad9ff234 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -203,10 +203,19 @@ static void dock_hotplug_event(struct dock_dependent_device *dd, u32 event, fixup(adev); return; } + } else if (cb_type == DOCK_CALL_UEVENT) { + void (*uevent)(struct acpi_device *, u32); + + uevent = adev->hp->uevent; + if (uevent) { + acpi_unlock_hp_context(); + uevent(adev, event); + return; + } } else { int (*notify)(struct acpi_device *, u32); - notify = adev->hp->event; + notify = adev->hp->notify; if (notify) { acpi_unlock_hp_context(); notify(adev, event); -- cgit v1.2.3