client_reg.EventMask	 = CS_EVENT_CARD_INSERTION | CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | CS_EVENT_CARD_REMOVAL | CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; client_reg.event_handler = wl3501_event; 
static dev_link_t *wl3501_attach(void){	client_reg_t client_reg;	dev_link_t *link;	struct net_device *dev;	int ret;	/* Initialize the dev_link_t structure */	link = kmalloc(sizeof(*link), GFP_KERNEL);	if (!link)		goto out;	memset(link, 0, sizeof(struct dev_link_t));	/* The io structure describes IO port mapping */	link->io.NumPorts1	= 16;	link->io.Attributes1	= IO_DATA_PATH_WIDTH_8;	link->io.IOAddrLines	= 5;	/* Interrupt setup */	link->irq.Attributes	= IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;	link->irq.IRQInfo1	= IRQ_LEVEL_ID;	link->irq.Handler = wl3501_interrupt;	/* General socket configuration */	link->conf.Attributes	= CONF_ENABLE_IRQ;	link->conf.Vcc		= 50;	link->conf.IntType	= INT_MEMORY_AND_IO;	link->conf.ConfigIndex	= 1;	link->conf.Present	= PRESENT_OPTION;	dev = alloc_etherdev(sizeof(struct wl3501_card));	if (!dev)		goto out_link;	dev->open		= wl3501_open;	dev->stop		= wl3501_close;	dev->hard_start_xmit	= wl3501_hard_start_xmit;	dev->tx_timeout		= wl3501_tx_timeout;	dev->watchdog_timeo	= 5 * HZ;	dev->get_stats		= wl3501_get_stats;	dev->get_wireless_stats = wl3501_get_wireless_stats;	dev->wireless_handlers	= (struct iw_handler_def *)&wl3501_handler_def;	SET_ETHTOOL_OPS(dev, &ops);	netif_stop_queue(dev);	link->priv = link->irq.Instance = dev;	/* Register with Card Services */	link->next		 = wl3501_dev_list;	wl3501_dev_list		 = link;	client_reg.dev_info	 = &wl3501_dev_info;	client_reg.EventMask	 = CS_EVENT_CARD_INSERTION |				   CS_EVENT_RESET_PHYSICAL |				   CS_EVENT_CARD_RESET |				   CS_EVENT_CARD_REMOVAL |				   CS_EVENT_PM_SUSPEND |				   CS_EVENT_PM_RESUME;	client_reg.event_handler = wl3501_event;	client_reg.Version	 = 0x0210;	client_reg.event_callback_args.client_data = link;	ret = pcmcia_register_client(&link->handle, &client_reg);	if (ret) {		cs_error(link->handle, RegisterClient, ret);		wl3501_detach(link);		link = NULL;	}out:	return link;out_link:	kfree(link);	link = NULL;	goto out;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1e212f3645a6b355de8c43a23376bc0e2ac49a63/wl3501_cs.c/clean/drivers/net/wireless/wl3501_cs.c