release/src-rt/linux/linux-2.6/drivers/net/ppp_generic.c
/*
 * Return the PPP unit number to which a channel is connected.
 */
Return the PPP unit number to which a channel is connected.
Return the PPP unit number to which a channel is connected .
int ppp_unit_number(struct ppp_channel *chan)
{
	struct channel *pch = chan->ppp;
	int unit = -1;
	if (pch != 0) {
		read_lock_bh(&pch->upl);
		if (pch->ppp != 0)
			unit = pch->ppp->file.index;
		read_unlock_bh(&pch->upl);
	}
	return unit;
}
int ppp_unit_number ( struct ppp_channel * chan ) { struct channel * pch = chan -> ppp ; int unit = -1 ; if ( pch != 0 ) { read_lock_bh ( & pch -> upl ) ; if ( pch -> ppp != 0 ) unit = pch -> ppp -> file . index ; read_unlock_bh ( & pch -> upl ) ; } return unit ; }
Return the PPP unit number to which a channel is connected.
Return the PPP unit number to which a channel is connected .