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 = &serial_event;
static dev_link_t *serial_attach(void){	struct serial_info *info;	client_reg_t client_reg;	dev_link_t *link;	int ret;	DEBUG(0, "serial_attach()\n");	/* Create new serial device */	info = kmalloc(sizeof (*info), GFP_KERNEL);	if (!info)		return NULL;	memset(info, 0, sizeof (*info));	link = &info->link;	link->priv = info;	link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;	link->io.NumPorts1 = 8;	link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;	link->irq.IRQInfo1 = IRQ_LEVEL_ID;	link->conf.Attributes = CONF_ENABLE_IRQ;	if (do_sound) {		link->conf.Attributes |= CONF_ENABLE_SPKR;		link->conf.Status = CCSR_AUDIO_ENA;	}	link->conf.IntType = INT_MEMORY_AND_IO;	/* 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 = &serial_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);		serial_detach(link);		return NULL;	}	return link;}