skt->socket.resource_ops = &pccard_static_ops; 
int au1x00_pcmcia_socket_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr){	struct skt_dev_info *sinfo;	int ret, i;	sinfo = kmalloc(sizeof(struct skt_dev_info), GFP_KERNEL);	if (!sinfo) {		ret = -ENOMEM;		goto out;	}	memset(sinfo, 0, sizeof(struct skt_dev_info));	sinfo->nskt = nr;	/*	 * Initialise the per-socket structure.	 */	for (i = 0; i < nr; i++) {		struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i);		memset(skt, 0, sizeof(*skt));		skt->socket.ops = &au1x00_pcmcia_operations;		skt->socket.owner = ops->owner;		skt->socket.dev.dev = dev;		init_timer(&skt->poll_timer);		skt->poll_timer.function = au1x00_pcmcia_poll_event;		skt->poll_timer.data = (unsigned long)skt;		skt->poll_timer.expires = jiffies + AU1000_PCMCIA_POLL_PERIOD;		skt->nr		= first + i;		skt->irq	= 255;		skt->dev	= dev;		skt->ops	= ops;		skt->res_skt.name	= skt_names[skt->nr];		skt->res_io.name	= "io";		skt->res_io.flags	= IORESOURCE_MEM | IORESOURCE_BUSY;		skt->res_mem.name	= "memory";		skt->res_mem.flags	= IORESOURCE_MEM;		skt->res_attr.name	= "attribute";		skt->res_attr.flags	= IORESOURCE_MEM;		/*		 * PCMCIA client drivers use the inb/outb macros to access the		 * IO registers. Since mips_io_port_base is added to the		 * access address of the mips implementation of inb/outb,		 * we need to subtract it here because we want to access the		 * I/O or MEM address directly, without going through this		 * "mips_io_port_base" mechanism.		 */		if (i == 0) {			skt->virt_io = (void *)				(ioremap((phys_t)AU1X_SOCK0_IO, 0x1000) -				(u32)mips_io_port_base);			skt->phys_attr = AU1X_SOCK0_PSEUDO_PHYS_ATTR;			skt->phys_mem = AU1X_SOCK0_PSEUDO_PHYS_MEM;		}#ifndef CONFIG_MIPS_XXS1500		else  {			skt->virt_io = (void *)				(ioremap((phys_t)AU1X_SOCK1_IO, 0x1000) -				(u32)mips_io_port_base);			skt->phys_attr = AU1X_SOCK1_PSEUDO_PHYS_ATTR;			skt->phys_mem = AU1X_SOCK1_PSEUDO_PHYS_MEM;		}#endif		pcmcia_base_vaddrs[i] = (u32 *)skt->virt_io;		ret = ops->hw_init(skt);		skt->socket.features = SS_CAP_STATIC_MAP|SS_CAP_PCCARD;		skt->socket.irq_mask = 0;		skt->socket.map_size = MAP_SIZE;		skt->socket.pci_irq = skt->irq;		skt->socket.io_offset = (unsigned long)skt->virt_io;		skt->status = au1x00_pcmcia_skt_state(skt);		ret = pcmcia_register_socket(&skt->socket);		if (ret)			goto out_err;		WARN_ON(skt->socket.sock != i);		add_timer(&skt->poll_timer);	}	dev_set_drvdata(dev, sinfo);	return 0;	do {		struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i);		del_timer_sync(&skt->poll_timer);		pcmcia_unregister_socket(&skt->socket);out_err:		flush_scheduled_work();		ops->hw_shutdown(skt);		i--;	} while (i > 0);	kfree(sinfo);out:	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/dc33a4a36cad02b939b9a4fb2f15ade17d61cdaf/au1000_generic.c/clean/drivers/pcmcia/au1000_generic.c