diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-21 01:10:27 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-21 01:10:27 +0100 |
commit | be27b3dcb02335ec093b81053fc8c84b32d3106e (patch) | |
tree | 473c5dcff60a8568d272da97830dbd0fb9e2fe8d /drivers/acpi/dock.c | |
parent | edf5bf34d40804fbef32f240a79b74ffc69a658b (diff) | |
download | op-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.c | 11 |
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); |