SET_NETDEV_DEV(dev, &pdev->dev); 
if (pdev != NULL) SET_NETDEV_DEV(dev, &pdev->dev); 
static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, long ioaddr){	static int version_disp;	char *print_name = DRV_NAME;	struct net_device *dev;	DFX_board_t	  *bp;			/* board pointer */	int alloc_size;				/* total buffer size used */	int err;	if (!version_disp) {	/* display version info if adapter is found */		version_disp = 1;	/* set display flag to TRUE so that */		printk(version);	/* we only display this string ONCE */	}	if (pdev != NULL)		print_name = pci_name(pdev);	dev = alloc_fddidev(sizeof(*bp));	if (!dev) {		printk(KERN_ERR "%s: unable to allocate fddidev, aborting\n",		       print_name);		return -ENOMEM;	}	/* Enable PCI device. */	if (pdev != NULL) {		err = pci_enable_device (pdev);		if (err) goto err_out;		ioaddr = pci_resource_start (pdev, 1);	}	SET_MODULE_OWNER(dev);	SET_NETDEV_DEV(dev, &pdev->dev);	bp = dev->priv;	if (!request_region(ioaddr,			    pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN,			    print_name)) {		printk(KERN_ERR "%s: Cannot reserve I/O resource "		       "0x%x @ 0x%lx, aborting\n", print_name,		       pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, ioaddr);		err = -EBUSY;		goto err_out;	}	/* Initialize new device structure */	dev->base_addr			= ioaddr; /* save port (I/O) base address */	dev->get_stats			= dfx_ctl_get_stats;	dev->open			= dfx_open;	dev->stop			= dfx_close;	dev->hard_start_xmit		= dfx_xmt_queue_pkt;	dev->set_multicast_list		= dfx_ctl_set_multicast_list;	dev->set_mac_address		= dfx_ctl_set_mac_address;	if (pdev == NULL) {		/* EISA board */		bp->bus_type = DFX_BUS_TYPE_EISA;		bp->next = root_dfx_eisa_dev;		root_dfx_eisa_dev = dev;	} else {		/* PCI board */		bp->bus_type = DFX_BUS_TYPE_PCI;		bp->pci_dev = pdev;		pci_set_drvdata (pdev, dev);		pci_set_master (pdev);	}	if (dfx_driver_init(dev, print_name) != DFX_K_SUCCESS) {		err = -ENODEV;		goto err_out_region;	}	err = register_netdev(dev);	if (err)		goto err_out_kfree;	printk("%s: registered as %s\n", print_name, dev->name);	return 0;err_out_kfree:	alloc_size = sizeof(PI_DESCR_BLOCK) +		     PI_CMD_REQ_K_SIZE_MAX + PI_CMD_RSP_K_SIZE_MAX +#ifndef DYNAMIC_BUFFERS		     (bp->rcv_bufs_to_post * PI_RCV_DATA_K_SIZE_MAX) +#endif		     sizeof(PI_CONSUMER_BLOCK) +		     (PI_ALIGN_K_DESC_BLK - 1);	if (bp->kmalloced)		pci_free_consistent(pdev, alloc_size,				    bp->kmalloced, bp->kmalloced_dma);err_out_region:	release_region(ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN);err_out:	free_netdev(dev);	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/feea1db26e5babbedf1f4f36223e21b2f2d6f499/defxx.c/clean/drivers/net/defxx.c