aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-10-07 16:12:54 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-10-10 16:34:26 +0200
commit7605c927219d82b40042c83f229676b14342ef6b (patch)
treed12ee81adad01e0c43c46fad2c8252b0f67afb90
parentef1857641b925c49bf0caa8a1b0cc13a75cd77c0 (diff)
downloadu-boot-7605c927219d82b40042c83f229676b14342ef6b.zip
u-boot-7605c927219d82b40042c83f229676b14342ef6b.tar.gz
u-boot-7605c927219d82b40042c83f229676b14342ef6b.tar.bz2
efi_driver: use efi_close_protocol
Avoid EFI_CALL() by using efi_close_protocol(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r--lib/efi_driver/efi_uclass.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c
index 45610d1..45f9351 100644
--- a/lib/efi_driver/efi_uclass.c
+++ b/lib/efi_driver/efi_uclass.c
@@ -97,10 +97,9 @@ static efi_status_t EFIAPI efi_uc_supported(
ret = check_node_type(controller_handle);
- r = EFI_CALL(systab.boottime->close_protocol(
- controller_handle, bp->ops->protocol,
- this->driver_binding_handle,
- controller_handle));
+ r = efi_close_protocol(controller_handle, bp->ops->protocol,
+ this->driver_binding_handle,
+ controller_handle);
if (r != EFI_SUCCESS)
ret = EFI_UNSUPPORTED;
out:
@@ -151,10 +150,9 @@ static efi_status_t EFIAPI efi_uc_start(
goto out;
err:
- r = EFI_CALL(systab.boottime->close_protocol(
- controller_handle, bp->ops->protocol,
- this->driver_binding_handle,
- controller_handle));
+ r = efi_close_protocol(controller_handle, bp->ops->protocol,
+ this->driver_binding_handle,
+ controller_handle);
if (r != EFI_SUCCESS)
EFI_PRINT("Failure to close handle\n");
@@ -177,9 +175,8 @@ static efi_status_t disconnect_child(efi_handle_t controller_handle,
efi_guid_t *guid_controller = NULL;
efi_guid_t *guid_child_controller = NULL;
- ret = EFI_CALL(systab.boottime->close_protocol(
- controller_handle, guid_controller,
- child_handle, child_handle));
+ ret = efi_close_protocol(controller_handle, guid_controller,
+ child_handle, child_handle);
if (ret != EFI_SUCCESS) {
EFI_PRINT("Cannot close protocol\n");
return ret;
@@ -252,9 +249,9 @@ static efi_status_t EFIAPI efi_uc_stop(
log_err("Cannot free EFI memory pool\n");
/* Detach driver from controller */
- ret = EFI_CALL(systab.boottime->close_protocol(
- controller_handle, bp->ops->protocol,
- this->driver_binding_handle, controller_handle));
+ ret = efi_close_protocol(controller_handle, bp->ops->protocol,
+ this->driver_binding_handle,
+ controller_handle);
out:
return EFI_EXIT(ret);
}