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 = &smc91c92_event;
static dev_link_t *smc91c92_attach(void){    client_reg_t client_reg;    struct smc_private *smc;    dev_link_t *link;    struct net_device *dev;    int ret;    DEBUG(0, "smc91c92_attach()\n");    /* Create new ethernet device */    dev = alloc_etherdev(sizeof(struct smc_private));    if (!dev)	return NULL;    smc = netdev_priv(dev);    link = &smc->link;    link->priv = dev;    spin_lock_init(&smc->lock);    link->io.NumPorts1 = 16;    link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;    link->io.IOAddrLines = 4;    link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;    link->irq.IRQInfo1 = IRQ_LEVEL_ID;    link->irq.Handler = &smc_interrupt;    link->irq.Instance = dev;    link->conf.Attributes = CONF_ENABLE_IRQ;    link->conf.Vcc = 50;    link->conf.IntType = INT_MEMORY_AND_IO;    /* The SMC91c92-specific entries in the device structure. */    SET_MODULE_OWNER(dev);    dev->hard_start_xmit = &smc_start_xmit;    dev->get_stats = &smc_get_stats;    dev->set_config = &s9k_config;    dev->set_multicast_list = &set_rx_mode;    dev->open = &smc_open;    dev->stop = &smc_close;    dev->do_ioctl = &smc_ioctl;    SET_ETHTOOL_OPS(dev, &ethtool_ops);#ifdef HAVE_TX_TIMEOUT    dev->tx_timeout = smc_tx_timeout;    dev->watchdog_timeo = TX_TIMEOUT;#endif    smc->mii_if.dev = dev;    smc->mii_if.mdio_read = mdio_read;    smc->mii_if.mdio_write = mdio_write;    smc->mii_if.phy_id_mask = 0x1f;    smc->mii_if.reg_num_mask = 0x1f;    /* 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 = &smc91c92_event;    client_reg.Version = 0x0210;    client_reg.event_callback_args.client_data = link;    ret = pcmcia_register_client(&link->handle, &client_reg);    if (ret != 0) {	cs_error(link->handle, RegisterClient, ret);	smc91c92_detach(link);	return NULL;    }    return link;} /* smc91c92_attach */