From 8f8fe1d458664aaa15fa82de78dfdb0eca74b2ca Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 5 Oct 2022 11:28:47 +0200 Subject: efi_driver: add init function to EFI block driver For handling added and removed block devices we need to register events which has to be done when the driver is installed. This patch only creates an empty init function that will be filled with code later on. The function needs to be called before any EFI block devices are used. Move the efi_driver_init() call to early init. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_setup.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/efi_loader/efi_setup.c') diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index c633fcd91e..113d5d5d56 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -198,6 +198,11 @@ static efi_status_t __efi_init_early(void) if (ret != EFI_SUCCESS) goto out; + /* Initialize EFI driver uclass */ + ret = efi_driver_init(); + if (ret != EFI_SUCCESS) + goto out; + ret = efi_disk_init(); out: return ret; @@ -319,11 +324,6 @@ efi_status_t efi_init_obj_list(void) if (ret != EFI_SUCCESS) goto out; - /* Initialize EFI driver uclass */ - ret = efi_driver_init(); - if (ret != EFI_SUCCESS) - goto out; - if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) { ret = efi_load_capsule_drivers(); if (ret != EFI_SUCCESS) -- cgit v1.2.3