summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dock.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-21 01:10:27 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-21 01:10:27 +0100
commitbe27b3dcb02335ec093b81053fc8c84b32d3106e (patch)
tree473c5dcff60a8568d272da97830dbd0fb9e2fe8d /drivers/acpi/dock.c
parentedf5bf34d40804fbef32f240a79b74ffc69a658b (diff)
downloadop-kernel-dev-be27b3dcb02335ec093b81053fc8c84b32d3106e.zip
op-kernel-dev-be27b3dcb02335ec093b81053fc8c84b32d3106e.tar.gz
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 <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r--drivers/acpi/dock.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 78c4ee7..a88fad9 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);
OpenPOWER on IntegriCloud