From 9869ee512522ce7019f8042fbc05aa02a8f60bde Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 1 Sep 2015 16:19:08 +0100 Subject: [efi] Allow calls to efi_snp_claim() and efi_snp_release() to be nested Signed-off-by: Michael Brown --- src/include/ipxe/efi/efi_snp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/include/ipxe') diff --git a/src/include/ipxe/efi/efi_snp.h b/src/include/ipxe/efi/efi_snp.h index 1e5c66626..4c5461ec4 100644 --- a/src/include/ipxe/efi/efi_snp.h +++ b/src/include/ipxe/efi/efi_snp.h @@ -73,14 +73,14 @@ extern int efi_snp_hii_install ( struct efi_snp_device *snpdev ); extern void efi_snp_hii_uninstall ( struct efi_snp_device *snpdev ); extern struct efi_snp_device * find_snpdev ( EFI_HANDLE handle ); extern struct efi_snp_device * last_opened_snpdev ( void ); -extern void efi_snp_set_claimed ( int claimed ); +extern void efi_snp_add_claim ( int delta ); /** * Claim network devices for use by iPXE * */ static inline void efi_snp_claim ( void ) { - efi_snp_set_claimed ( 1 ); + efi_snp_add_claim ( +1 ); } /** @@ -88,7 +88,7 @@ static inline void efi_snp_claim ( void ) { * */ static inline void efi_snp_release ( void ) { - efi_snp_set_claimed ( 0 ); + efi_snp_add_claim ( -1 ); } #endif /* _IPXE_EFI_SNP_H */ -- cgit v1.2.3-55-g7522