mirror of
https://github.com/ipxe/ipxe
synced 2025-12-13 15:31:42 +03:00
[refcnt] Add ref_init() wrapper function
Standardise on using ref_init() to initialise an embedded reference count, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -328,7 +328,7 @@ struct net_device * alloc_netdev ( size_t priv_size ) {
|
||||
total_len = ( sizeof ( *netdev ) + priv_size );
|
||||
netdev = zalloc ( total_len );
|
||||
if ( netdev ) {
|
||||
netdev->refcnt.free = free_netdev;
|
||||
ref_init ( &netdev->refcnt, free_netdev );
|
||||
netdev->link_rc = -EUNKNOWN_LINK_STATUS;
|
||||
INIT_LIST_HEAD ( &netdev->tx_queue );
|
||||
INIT_LIST_HEAD ( &netdev->rx_queue );
|
||||
|
||||
Reference in New Issue
Block a user