dev->do_ioctl = &ray_dev_ioctl; 
static dev_link_t *ray_attach(void){    client_reg_t client_reg;    dev_link_t *link;    ray_dev_t *local;    int ret;    struct net_device *dev;        DEBUG(1, "ray_attach()\n");    /* Initialize the dev_link_t structure */    link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL);    if (!link)	    return NULL;    /* Allocate space for private device-specific data */    dev = alloc_etherdev(sizeof(ray_dev_t));    if (!dev)	    goto fail_alloc_dev;    local = dev->priv;    memset(link, 0, sizeof(struct dev_link_t));    /* The io structure describes IO port mapping. None used here */    link->io.NumPorts1 = 0;    link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;    link->io.IOAddrLines = 5;    /* Interrupt setup. For PCMCIA, driver takes what's given */    link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;    link->irq.IRQInfo1 = IRQ_LEVEL_ID;    link->irq.Handler = &ray_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;    link->priv = dev;    link->irq.Instance = dev;        local->finder = link;    local->card_status = CARD_INSERTED;    local->authentication_state = UNAUTHENTICATED;    local->num_multi = 0;    DEBUG(2,"ray_attach link = %p,  dev = %p,  local = %p, intr = %p\n",          link,dev,local,&ray_interrupt);    /* Raylink entries in the device structure */    dev->hard_start_xmit = &ray_dev_start_xmit;    dev->set_config = &ray_dev_config;    dev->get_stats  = &ray_get_stats;    dev->do_ioctl = &ray_dev_ioctl;    SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);#if WIRELESS_EXT > 7	/* If wireless extension exist in the kernel */    dev->get_wireless_stats = ray_get_wireless_stats;#endif    dev->set_multicast_list = &set_multicast_list;    DEBUG(2,"ray_cs ray_attach calling ether_setup.)\n");    SET_MODULE_OWNER(dev);    dev->init = &ray_dev_init;    dev->open = &ray_open;    dev->stop = &ray_dev_close;    netif_stop_queue(dev);    /* Register with Card Services */    link->next = dev_list;    dev_list = link;    client_reg.dev_info = &dev_info;    client_reg.Version = 0x0210;    client_reg.event_callback_args.client_data = link;    DEBUG(2,"ray_cs ray_attach calling pcmcia_register_client(...)\n");    init_timer(&local->timer);    ret = pcmcia_register_client(&link->handle, &client_reg);    if (ret != 0) {        printk("ray_cs ray_attach RegisterClient unhappy - detaching\n");        cs_error(link->handle, RegisterClient, ret);        ray_detach(link);        return NULL;    }    DEBUG(2,"ray_cs ray_attach ending\n");    return link;fail_alloc_dev:    kfree(link);    return NULL;} /* ray_attach */
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/3d5d5ac085c467f05cce85d32985e78912db4a7e/ray_cs.c/buggy/drivers/net/wireless/ray_cs.c