Skip to content
Snippets Groups Projects
Commit 7605c927 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt :speech_balloon:
Browse files

efi_driver: use efi_close_protocol


Avoid EFI_CALL() by using efi_close_protocol().

Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
parent ef185764
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment