static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_device_id *ent){		static int versionprinted;	struct net_device *dev;	struct net_local *tp;	int i, ret;	unsigned int pci_irq_line;	unsigned long pci_ioaddr;	struct card_info *cardinfo = &card_info_table[ent->driver_data];			if (versionprinted++ == 0)		printk("%s", version);	if (pci_enable_device(pdev))		return -EIO;	/* Remove I/O space marker in bit 0. */	pci_irq_line = pdev->irq;	pci_ioaddr = pci_resource_start (pdev, 0);	/* At this point we have found a valid card. */	dev = alloc_trdev(sizeof(struct net_local));	if (!dev)		return -ENOMEM;	SET_MODULE_OWNER(dev);	if (!request_region(pci_ioaddr, TMS_PCI_IO_EXTENT, dev->name)) {		ret = -EBUSY;		goto err_out_trdev;	}	ret = request_irq(pdev->irq, tms380tr_interrupt, SA_SHIRQ,			  dev->name, dev);	if (ret)		goto err_out_region;	dev->base_addr	= pci_ioaddr;	dev->irq 	= pci_irq_line;	dev->dma	= 0;	printk("%s: %s\n", dev->name, cardinfo->name);	printk("%s:    IO: %#4lx  IRQ: %d\n",	       dev->name, dev->base_addr, dev->irq);			tms_pci_read_eeprom(dev);	printk("%s:    Ring Station Address: ", dev->name);	printk("%2.2x", dev->dev_addr[0]);	for (i = 1; i < 6; i++)		printk(":%2.2x", dev->dev_addr[i]);	printk("\n");			ret = tmsdev_init(dev, PCI_MAX_ADDRESS, pdev);	if (ret) {		printk("%s: unable to get memory for dev->priv.\n", dev->name);		goto err_out_irq;	}	tp = dev->priv;	tp->setnselout = tms_pci_setnselout_pins;			tp->sifreadb = tms_pci_sifreadb;	tp->sifreadw = tms_pci_sifreadw;	tp->sifwriteb = tms_pci_sifwriteb;	tp->sifwritew = tms_pci_sifwritew;			memcpy(tp->ProductID, cardinfo->name, PROD_ID_SIZE + 1);	tp->tmspriv = cardinfo;	dev->open = tms380tr_open;	dev->stop = tms380tr_close;	pci_set_drvdata(pdev, dev);	SET_NETDEV_DEV(dev, &pdev->dev);	ret = register_netdev(dev);	if (ret)		goto err_out_tmsdev;		return 0;err_out_tmsdev:	pci_set_drvdata(pdev, NULL);	tmsdev_term(dev);err_out_irq:	free_irq(pdev->irq, dev);err_out_region:	release_region(pci_ioaddr, TMS_PCI_IO_EXTENT);err_out_trdev:	free_netdev(dev);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/504ff16cecf2a788181eddc9d6e47d94ce50a9f6/tmspci.c/buggy/drivers/net/tokenring/tmspci.c