diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-10-05 11:28:47 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-10-06 22:54:58 +0200 |
commit | 8f8fe1d458664aaa15fa82de78dfdb0eca74b2ca (patch) | |
tree | 4ce4f091b1cfe1c427de7d32f6e1e406d5f52d41 /lib/efi_loader/efi_setup.c | |
parent | ec4f675f9ebec2535f2cd050aed7f9c106a5bee9 (diff) |
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 <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib/efi_loader/efi_setup.c')
-rw-r--r-- | lib/efi_loader/efi_setup.c | 10 |
1 files changed, 5 insertions, 5 deletions
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) |