efi_status_t ret;
for (i = 0, handle = handles; i < no_handles; i++, handle++) {
- ret = EFI_CALL(efi_handle_protocol(
- *handle,
- &efi_guid_firmware_management_protocol,
- (void **)&fmp));
+ struct efi_handler *fmp_handler;
+
+ ret = efi_search_protocol(
+ *handle, &efi_guid_firmware_management_protocol,
+ &fmp_handler);
if (ret != EFI_SUCCESS)
continue;
+ fmp = fmp_handler->protocol_interface;
/* get device's image info */
info_size = 0;
skip:
efi_free_pool(package_version_name);
free(image_info);
- EFI_CALL(efi_close_protocol(
- (efi_handle_t)fmp,
- &efi_guid_firmware_management_protocol,
- NULL, NULL));
if (found)
return fmp;
}