/* Convert PCMCIA socket state to our socket configure structure.  */
static int soc_common_pcmcia_config_skt(struct soc_pcmcia_socket *skt, socket_state_t *state)
/* Convert PCMCIA socket state to our socket configure structure.  */
static int soc_common_pcmcia_config_skt(struct soc_pcmcia_socket *skt, socket_state_t *state)
{
	int ret;
	ret = skt->ops->configure_socket(skt, state);
	if (ret == 0) {
		if (skt->irq_state != 1 && state->io_irq) {
			skt->irq_state = 1;
			set_irq_type(skt->socket.pci_irq, IRQ_TYPE_EDGE_FALLING);
		} else if (skt->irq_state == 1 && state->io_irq == 0) {
			skt->irq_state = 0;
			set_irq_type(skt->socket.pci_irq, IRQ_TYPE_NONE);
		}
		skt->cs_state = *state;
	}
	if (ret < 0)
		printk(KERN_ERR "soc_common_pcmcia: unable to configure "
		       "socket %d\n", skt->nr);
	return ret;
}