Merge branch 'acpi-hotplug'

* acpi-hotplug:
  ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines
  ACPI / hotplug: Do not execute "insert in progress" _OST
  ACPI / hotplug: Carry out PCI root eject directly
  ACPI / hotplug: Merge device hot-removal routines
  ACPI / hotplug: Make acpi_bus_hot_remove_device() internal
  ACPI / hotplug: Simplify device ejection routines
  ACPI / hotplug: Fix handle_root_bridge_removal()
  ACPI / hotplug: Refuse to hot-remove all objects with disabled hotplug
  ACPI / scan: Start matching drivers after trying scan handlers
  ACPI: Remove acpi_pci_slot_init() headers from internal.h

Conflicts:
	include/acpi/acpiosxf.h (with the 'acpica' branch)
This commit is contained in:
Rafael J. Wysocki
2013-11-07 19:31:15 +01:00
8 changed files with 150 additions and 249 deletions

View File

@@ -669,39 +669,20 @@ static void dock_notify(struct dock_station *ds, u32 event)
}
}
struct dock_data {
struct dock_station *ds;
u32 event;
};
static void acpi_dock_deferred_cb(void *context)
static void acpi_dock_deferred_cb(void *data, u32 event)
{
struct dock_data *data = context;
acpi_scan_lock_acquire();
dock_notify(data->ds, data->event);
dock_notify(data, event);
acpi_scan_lock_release();
kfree(data);
}
static void dock_notify_handler(acpi_handle handle, u32 event, void *data)
{
struct dock_data *dd;
if (event != ACPI_NOTIFY_BUS_CHECK && event != ACPI_NOTIFY_DEVICE_CHECK
&& event != ACPI_NOTIFY_EJECT_REQUEST)
return;
dd = kmalloc(sizeof(*dd), GFP_KERNEL);
if (dd) {
acpi_status status;
dd->ds = data;
dd->event = event;
status = acpi_os_hotplug_execute(acpi_dock_deferred_cb, dd);
if (ACPI_FAILURE(status))
kfree(dd);
}
acpi_hotplug_execute(acpi_dock_deferred_cb, data, event);
}
/**