kernels/linux-2.4.0/drivers/net/wan/lapbether.c
/*
 *	Sanity check: remove all devices that ceased to exists and
 *	return '1' if the given LAPB device was affected.
 */
Sanity check: remove all devices that ceased to exists and
return '1' if the given LAPB device was affected.
Sanity check : remove all devices that ceased to exists and return ' 1 ' if the given LAPB device was affected .
static int lapbeth_check_devices(struct net_device *dev)
{
	struct lapbethdev *lapbeth, *lapbeth_prev;
	int result = 0;
	unsigned long flags;
	save_flags(flags);
	cli();
	lapbeth_prev = NULL;
	for (lapbeth = lapbeth_devices; lapbeth != NULL; lapbeth = lapbeth->next) {
		if (!dev_get(lapbeth->ethname)) {
			if (lapbeth_prev)
				lapbeth_prev->next = lapbeth->next;
			else
				lapbeth_devices = lapbeth->next;
			if (&lapbeth->axdev == dev)
				result = 1;
			unregister_netdev(&lapbeth->axdev);
			dev_put(lapbeth->ethdev);
			kfree(lapbeth);
		}
		lapbeth_prev = lapbeth;
	}
	restore_flags(flags);
	return result;
}
static int lapbeth_check_devices ( struct net_device * dev ) { struct lapbethdev * lapbeth , * lapbeth_prev ; int result = 0 ; unsigned long flags ; save_flags ( flags ) ; cli ( ) ; lapbeth_prev = NULL ; for ( lapbeth = lapbeth_devices ; lapbeth != NULL ; lapbeth = lapbeth -> next ) { if ( ! dev_get ( lapbeth -> ethname ) ) { if ( lapbeth_prev ) lapbeth_prev -> next = lapbeth -> next ; else lapbeth_devices = lapbeth -> next ; if ( & lapbeth -> axdev == dev ) result = 1 ; unregister_netdev ( & lapbeth -> axdev ) ; dev_put ( lapbeth -> ethdev ) ; kfree ( lapbeth ) ; } lapbeth_prev = lapbeth ; } restore_flags ( flags ) ; return result ; }
Sanity check: remove all devices that ceased to exists and
      return '1' if the given LAPB device was affected.
Sanity check : remove all devices that ceased to exists and return ' 1 ' if the given LAPB device was affected .