mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 03:55:46 +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:
@@ -438,7 +438,7 @@ int aoe_attach ( struct ata_device *ata, struct net_device *netdev,
|
||||
aoe = zalloc ( sizeof ( *aoe ) );
|
||||
if ( ! aoe )
|
||||
return -ENOMEM;
|
||||
aoe->refcnt.free = aoe_free;
|
||||
ref_init ( &aoe->refcnt, aoe_free );
|
||||
aoe->netdev = netdev_get ( netdev );
|
||||
memcpy ( aoe->target, netdev->ll_broadcast, sizeof ( aoe->target ) );
|
||||
aoe->tag = AOE_TAG_MAGIC;
|
||||
|
||||
Reference in New Issue
Block a user