mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
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>
This commit is contained in:
parent
ef1857641b
commit
7605c92721
1 changed files with 11 additions and 14 deletions
|
@ -97,10 +97,9 @@ static efi_status_t EFIAPI efi_uc_supported(
|
||||||
|
|
||||||
ret = check_node_type(controller_handle);
|
ret = check_node_type(controller_handle);
|
||||||
|
|
||||||
r = EFI_CALL(systab.boottime->close_protocol(
|
r = efi_close_protocol(controller_handle, bp->ops->protocol,
|
||||||
controller_handle, bp->ops->protocol,
|
|
||||||
this->driver_binding_handle,
|
this->driver_binding_handle,
|
||||||
controller_handle));
|
controller_handle);
|
||||||
if (r != EFI_SUCCESS)
|
if (r != EFI_SUCCESS)
|
||||||
ret = EFI_UNSUPPORTED;
|
ret = EFI_UNSUPPORTED;
|
||||||
out:
|
out:
|
||||||
|
@ -151,10 +150,9 @@ static efi_status_t EFIAPI efi_uc_start(
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
r = EFI_CALL(systab.boottime->close_protocol(
|
r = efi_close_protocol(controller_handle, bp->ops->protocol,
|
||||||
controller_handle, bp->ops->protocol,
|
|
||||||
this->driver_binding_handle,
|
this->driver_binding_handle,
|
||||||
controller_handle));
|
controller_handle);
|
||||||
if (r != EFI_SUCCESS)
|
if (r != EFI_SUCCESS)
|
||||||
EFI_PRINT("Failure to close handle\n");
|
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_controller = NULL;
|
||||||
efi_guid_t *guid_child_controller = NULL;
|
efi_guid_t *guid_child_controller = NULL;
|
||||||
|
|
||||||
ret = EFI_CALL(systab.boottime->close_protocol(
|
ret = efi_close_protocol(controller_handle, guid_controller,
|
||||||
controller_handle, guid_controller,
|
child_handle, child_handle);
|
||||||
child_handle, child_handle));
|
|
||||||
if (ret != EFI_SUCCESS) {
|
if (ret != EFI_SUCCESS) {
|
||||||
EFI_PRINT("Cannot close protocol\n");
|
EFI_PRINT("Cannot close protocol\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -252,9 +249,9 @@ static efi_status_t EFIAPI efi_uc_stop(
|
||||||
log_err("Cannot free EFI memory pool\n");
|
log_err("Cannot free EFI memory pool\n");
|
||||||
|
|
||||||
/* Detach driver from controller */
|
/* Detach driver from controller */
|
||||||
ret = EFI_CALL(systab.boottime->close_protocol(
|
ret = efi_close_protocol(controller_handle, bp->ops->protocol,
|
||||||
controller_handle, bp->ops->protocol,
|
this->driver_binding_handle,
|
||||||
this->driver_binding_handle, controller_handle));
|
controller_handle);
|
||||||
out:
|
out:
|
||||||
return EFI_EXIT(ret);
|
return EFI_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue