From 44549d62c31dc433366b4c5d6e58e0e3091e542b Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 26 Nov 2017 14:05:23 +0100 Subject: efi_loader: helper function to add EFI object to list To avoid duplicate coding provide a helper function that initializes an EFI object and adds it to the EFI object list. efi_exit() is the only place where we dereference a handle to obtain a protocol interface. Add a comment to the function. Suggested-by: Alexander Graf Reviewed-by: Simon Glass Signed-off-by: Heinrich Schuchardt Signed-off-by: Alexander Graf --- include/efi_loader.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/efi_loader.h b/include/efi_loader.h index a73bbc12695..c0caabddb12 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -186,6 +186,8 @@ void efi_restore_gd(void); void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map); /* Call this to set the current device name */ void efi_set_bootdev(const char *dev, const char *devnr, const char *path); +/* Add a new object to the object list. */ +void efi_add_handle(struct efi_object *obj); /* Create handle */ efi_status_t efi_create_handle(void **handle); /* Call this to validate a handle and find the EFI object for it */ -- cgit v1.3.1