summaryrefslogtreecommitdiff
path: root/lib/efi_driver/efi_block_device.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-10-05 11:28:47 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-10-06 22:54:58 +0200
commit8f8fe1d458664aaa15fa82de78dfdb0eca74b2ca (patch)
tree4ce4f091b1cfe1c427de7d32f6e1e406d5f52d41 /lib/efi_driver/efi_block_device.c
parentec4f675f9ebec2535f2cd050aed7f9c106a5bee9 (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_driver/efi_block_device.c')
-rw-r--r--lib/efi_driver/efi_block_device.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c
index f440067f702..bd3688848ba 100644
--- a/lib/efi_driver/efi_block_device.c
+++ b/lib/efi_driver/efi_block_device.c
@@ -197,6 +197,17 @@ static efi_status_t efi_bl_bind(
return ret;
}
+/**
+ * efi_bl_init() - initialize block device driver
+ *
+ * @this: extended driver binding protocol
+ */
+static efi_status_t
+efi_bl_init(struct efi_driver_binding_extended_protocol *this)
+{
+ return EFI_SUCCESS;
+}
+
/* Block device driver operators */
static const struct blk_ops efi_blk_ops = {
.read = efi_bl_read,
@@ -215,6 +226,7 @@ U_BOOT_DRIVER(efi_blk) = {
static const struct efi_driver_ops driver_ops = {
.protocol = &efi_block_io_guid,
.child_protocol = &efi_block_io_guid,
+ .init = efi_bl_init,
.bind = efi_bl_bind,
};