client_reg.EventMask	 = CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET	| CS_EVENT_PM_SUSPEND	| CS_EVENT_PM_RESUME	 ; client_reg.event_handler = &nsp_cs_event; 
static dev_link_t *nsp_cs_attach(void){	scsi_info_t  *info;	client_reg_t  client_reg;	dev_link_t   *link;	int	      ret;	nsp_hw_data  *data = &nsp_data_base;	nsp_dbg(NSP_DEBUG_INIT, "in");	/* Create new SCSI device */	info = kmalloc(sizeof(*info), GFP_KERNEL);	if (info == NULL) { return NULL; }	memset(info, 0, sizeof(*info));	link = &info->link;	link->priv = info;	data->ScsiInfo = info;	nsp_dbg(NSP_DEBUG_INIT, "info=0x%p", info);	/* The io structure describes IO port mapping */	link->io.NumPorts1	 = 0x10;	link->io.Attributes1	 = IO_DATA_PATH_WIDTH_AUTO;	link->io.IOAddrLines	 = 10;	/* not used */	/* Interrupt setup */	link->irq.Attributes	 = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;	link->irq.IRQInfo1	 = IRQ_LEVEL_ID;	/* Interrupt handler */	link->irq.Handler	 = &nspintr;	link->irq.Instance       = info;	link->irq.Attributes     |= (SA_SHIRQ | SA_SAMPLE_RANDOM);	/* General socket configuration */	link->conf.Attributes	 = CONF_ENABLE_IRQ;	link->conf.Vcc		 = 50;	link->conf.IntType	 = INT_MEMORY_AND_IO;	link->conf.Present	 = PRESENT_OPTION;	/* Register with Card Services */	link->next               = dev_list;	dev_list                 = link;	client_reg.dev_info	 = &dev_info;	client_reg.EventMask	 =		CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |		CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET	|		CS_EVENT_PM_SUSPEND	| CS_EVENT_PM_RESUME	 ;	client_reg.event_handler = &nsp_cs_event;	client_reg.Version	 = 0x0210;	client_reg.event_callback_args.client_data = link;	ret = pcmcia_register_client(&link->handle, &client_reg);	if (ret != CS_SUCCESS) {		cs_error(link->handle, RegisterClient, ret);		nsp_cs_detach(link);		return NULL;	}	nsp_dbg(NSP_DEBUG_INIT, "link=0x%p", link);	return link;} /* nsp_cs_attach */
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1e212f3645a6b355de8c43a23376bc0e2ac49a63/nsp_cs.c/buggy/drivers/scsi/pcmcia/nsp_cs.c