/* acpiphp_eject_slot - physically eject the slot @slot: ACPI PHP slot  */
int acpiphp_eject_slot(struct acpiphp_slot *slot)
/* acpiphp_eject_slot - physically eject the slot @slot: ACPI PHP slot  */
int acpiphp_eject_slot(struct acpiphp_slot *slot)
{
	acpi_status status;
	struct acpiphp_func *func;
	struct acpi_object_list arg_list;
	union acpi_object arg;
	list_for_each_entry(func, &slot->funcs, sibling) {
		if ((func->flags & FUNC_HAS_EJ0)) {
			arg_list.count = 1;
			arg_list.pointer = &arg;
			arg.type = ACPI_TYPE_INTEGER;
			arg.integer.value = 1;
			status = acpi_evaluate_object(func->handle, "_EJ0", &arg_list, NULL);
			if (ACPI_FAILURE(status)) {
				warn("%s: _EJ0 failed\n", __func__);
				return -1;
			} else
				break;
		}
	}
	return 0;
}