[U-Boot] [RFC v2 15/15] cmd: efidebug: aligned with DM-efi integration

AKASHI Takahiro takahiro.akashi at linaro.org
Fri Feb 8 08:15:42 UTC 2019


Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
 cmd/efidebug.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 39398669e18f..e1c3628f72fb 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -8,6 +8,7 @@
 #include <charset.h>
 #include <common.h>
 #include <command.h>
+#include <dm.h>
 #include <efi_loader.h>
 #include <environment.h>
 #include <exports.h>
@@ -114,6 +115,7 @@ static int do_efi_show_devices(cmd_tbl_t *cmdtp, int flag,
 static int efi_get_driver_handle_info(efi_handle_t handle, u16 **driver_name,
 				      u16 **image_path)
 {
+	struct udevice *protocol;
 	struct efi_handler *handler;
 	struct efi_loaded_image *image;
 	efi_status_t ret;
@@ -125,12 +127,13 @@ static int efi_get_driver_handle_info(efi_handle_t handle, u16 **driver_name,
 	*driver_name = NULL;
 
 	/* image name */
-	ret = efi_search_protocol(handle, &efi_guid_loaded_image, &handler);
+	ret = efi_search_protocol(handle, &efi_guid_loaded_image, &protocol);
 	if (ret != EFI_SUCCESS) {
 		*image_path = NULL;
 		return 0;
 	}
 
+	handler = protocol->uclass_platdata;
 	image = handler->protocol_interface;
 	*image_path = efi_dp_str(image->file_path);
 
-- 
2.19.1



More information about the U-Boot mailing list