kernels/linux-2.4.0/drivers/net/tlan.c
/***************************************************************
	 *	TLan_Close
	 *  
	 * 	Returns:
	 *		An error code.
	 *	Parms:
	 *		dev	The device structure of the device to
	 *			close.
	 *
	 *	This function shuts down the adapter.  It records any
	 *	stats, puts the adapter into reset state, deactivates
	 *	its time as needed, and	frees the irq it is using.
	 *
	 **************************************************************/


An error code.
Parms:
dev     The device structure of the device to
close.

This function shuts down the adapter.  It records any
stats, puts the adapter into reset state, deactivates
its time as needed, and frees the irq it is using.
An error code . Parms : dev The device structure of the device to close . This function shuts down the adapter . It records any stats puts the adapter into reset state deactivates its time as needed and frees the irq it is using .
static int TLan_Close(struct net_device *dev)
{
	TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
	netif_stop_queue(dev);
	TLan_ReadAndClearStats( dev, TLAN_RECORD );
	outl( TLAN_HC_AD_RST, dev->base_addr + TLAN_HOST_CMD );
	if ( priv->timer.function != NULL ) {
		del_timer_sync( &priv->timer );
		priv->timer.function = NULL;
	}
	free_irq( dev->irq, dev );
	TLan_FreeLists( dev );
	TLAN_DBG( TLAN_DEBUG_GNRL, "Device %s closed.\n", dev->name );
	return 0;
}
static int TLan_Close ( struct net_device * dev ) { TLanPrivateInfo * priv = ( TLanPrivateInfo * ) dev -> priv ; netif_stop_queue ( dev ) ; TLan_ReadAndClearStats ( dev , TLAN_RECORD ) ; outl ( TLAN_HC_AD_RST , dev -> base_addr + TLAN_HOST_CMD ) ; if ( priv -> timer . function != NULL ) { del_timer_sync ( & priv -> timer ) ; priv -> timer . function = NULL ; } free_irq ( dev -> irq , dev ) ; TLan_FreeLists ( dev ) ; TLAN_DBG ( TLAN_DEBUG_GNRL , " \n " , dev -> name ) ; return 0 ; }
TLan_Close
TLan_Close