aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dock.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-20 19:10:27 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-20 19:10:27 -0500
commitbe27b3dcb02335ec093b81053fc8c84b32d3106e (patch)
tree473c5dcff60a8568d272da97830dbd0fb9e2fe8d /drivers/acpi/dock.c
parentedf5bf34d40804fbef32f240a79b74ffc69a658b (diff)
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 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,
203 fixup(adev); 203 fixup(adev);
204 return; 204 return;
205 } 205 }
206 } else if (cb_type == DOCK_CALL_UEVENT) {
207 void (*uevent)(struct acpi_device *, u32);
208
209 uevent = adev->hp->uevent;
210 if (uevent) {
211 acpi_unlock_hp_context();
212 uevent(adev, event);
213 return;
214 }
206 } else { 215 } else {
207 int (*notify)(struct acpi_device *, u32); 216 int (*notify)(struct acpi_device *, u32);
208 217
209 notify = adev->hp->event; 218 notify = adev->hp->notify;
210 if (notify) { 219 if (notify) {
211 acpi_unlock_hp_context(); 220 acpi_unlock_hp_context();
212 notify(adev, event); 221 notify(adev, event);