/* Check to make sure the dock device is still present, then undock and hotremove all the devices that may need removing.  */
static int handle_eject_request(struct dock_station *ds, u32 event)
/* Check to make sure the dock device is still present, then undock and hotremove all the devices that may need removing.  */
static int handle_eject_request(struct dock_station *ds, u32 event)
{
	if (dock_in_progress(ds))
		return -EBUSY;
	dock_event(ds, event, UNDOCK_EVENT);
	hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST);
	undock(ds);
	dock_lock(ds, 0);
	eject_dock(ds);
	if (dock_present(ds)) {
		printk(KERN_ERR PREFIX "Unable to undock!\n");
		return -EBUSY;
	}
	complete_undock(ds);
	return 0;
}