/* acpiphp_enable_slot - power on slot @slot: ACPI PHP slot  */
int acpiphp_enable_slot(struct acpiphp_slot *slot)
/* acpiphp_enable_slot - power on slot @slot: ACPI PHP slot  */
int acpiphp_enable_slot(struct acpiphp_slot *slot)
{
	int retval;
	mutex_lock(&slot->crit_sect);
	retval = power_on_slot(slot);
	if (retval)
		goto err_exit;
	if (get_slot_status(slot) == ACPI_STA_ALL) {
		retval = enable_device(slot);
		if (retval)
			power_off_slot(slot);
	} else {
		dbg("%s: Slot status is not ACPI_STA_ALL\n", __func__);
		power_off_slot(slot);
	}
 err_exit:
	mutex_unlock(&slot->crit_sect);
	return retval;
}