mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
efi_loader: rework efi_search_obj
EFI_HANDLEs are used both in boottime and in runtime services. efi_search_obj is a function that can be used to validate handles. So let's make it accessible via efi_loader.h. We can simplify the coding using list_for_each_entry. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
caf864e434
commit
1b68153af1
2 changed files with 5 additions and 6 deletions
|
@ -684,14 +684,11 @@ static efi_status_t EFIAPI efi_check_event(struct efi_event *event)
|
|||
* @handle handle to find
|
||||
* @return EFI object
|
||||
*/
|
||||
static struct efi_object *efi_search_obj(void *handle)
|
||||
struct efi_object *efi_search_obj(void *handle)
|
||||
{
|
||||
struct list_head *lhandle;
|
||||
struct efi_object *efiobj;
|
||||
|
||||
list_for_each(lhandle, &efi_obj_list) {
|
||||
struct efi_object *efiobj;
|
||||
|
||||
efiobj = list_entry(lhandle, struct efi_object, link);
|
||||
list_for_each_entry(efiobj, &efi_obj_list, link) {
|
||||
if (efiobj->handle == handle)
|
||||
return efiobj;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue