ret = tmsdev_init(dev, PCI_MAX_ADDRESS, pdev); 
ret = tmsdev_init(dev, PCI_MAX_ADDRESS, &pdev->dev); 
static int __devinit abyss_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, pci_irq_line;	unsigned long pci_ioaddr;		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, ABYSS_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;			printk("%s: Madge Smart 16/4 PCI Mk2 (Abyss)\n", dev->name);	printk("%s:    IO: %#4lx  IRQ: %d\n",	       dev->name, pci_ioaddr, dev->irq);	/*	 * The TMS SIF registers lay 0x10 above the card base address.	 */	dev->base_addr += 0x10;			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;	}	abyss_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");	tp = netdev_priv(dev);	tp->setnselout = abyss_setnselout_pins;	tp->sifreadb = abyss_sifreadb;	tp->sifreadw = abyss_sifreadw;	tp->sifwriteb = abyss_sifwriteb;	tp->sifwritew = abyss_sifwritew;	memcpy(tp->ProductID, "Madge PCI 16/4 Mk2", PROD_ID_SIZE + 1);			dev->open = abyss_open;	dev->stop = abyss_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, ABYSS_IO_EXTENT);err_out_trdev:	free_netdev(dev);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/504ff16cecf2a788181eddc9d6e47d94ce50a9f6/abyss.c/clean/drivers/net/tokenring/abyss.c