switch (slot->dev_type) { case PCI_DEV: retval = rpaphp_enable_pci_slot(slot); break; case VIO_DEV: retval = rpaphp_enable_vio_slot(slot); break; default: retval = -EINVAL; }
retval = rpaphp_enable_pci_slot(slot);
static int enable_slot(struct hotplug_slot *hotplug_slot){	int retval = 0;	struct slot *slot = (struct slot *)hotplug_slot->private;	if (slot->state == CONFIGURED) {		dbg("%s: %s is already enabled\n", __FUNCTION__, slot->name);		goto exit;	}	dbg("ENABLING SLOT %s\n", slot->name);	down(&rpaphp_sem);	switch (slot->dev_type) {	case PCI_DEV:		retval = rpaphp_enable_pci_slot(slot);		break;	case VIO_DEV:		retval = rpaphp_enable_vio_slot(slot);		break;	default:		retval = -EINVAL;	}	up(&rpaphp_sem);exit:	dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);	return retval;}