]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: fixup protocol, avoid forward declaration
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 16 Jan 2021 07:50:10 +0000 (08:50 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 20 Jan 2021 07:17:17 +0000 (08:17 +0100)
Avoid a forward declaration.

Add a missing function description.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_dt_fixup.c

index 5f0ae5c3383e874d5693202e13918ded9cb84496..c2f2daef3376582252da4175c9aa41f64055f8c9 100644 (file)
 #include <efi_loader.h>
 #include <mapmem.h>
 
-static efi_status_t EFIAPI efi_dt_fixup(struct efi_dt_fixup_protocol *this,
-                                       void *dtb,
-                                       efi_uintn_t *buffer_size,
-                                       u32 flags);
-
-struct efi_dt_fixup_protocol efi_dt_fixup_prot = {
-       .revision = EFI_DT_FIXUP_PROTOCOL_REVISION,
-       .fixup = efi_dt_fixup
-};
-
 const efi_guid_t efi_guid_dt_fixup_protocol = EFI_DT_FIXUP_PROTOCOL_GUID;
 
 /**
@@ -102,6 +92,18 @@ void efi_carve_out_dt_rsv(void *fdt)
        }
 }
 
+/**
+ * efi_dt_fixup() - fix up device tree
+ *
+ * This function implements the Fixup() service of the
+ * EFI Device Tree Fixup Protocol.
+ *
+ * @this:              instance of the protocol
+ * @dtb:               device tree provided by caller
+ * @buffer_size:       size of buffer for the device tree including free space
+ * @flags:             bit field designating action to be performed
+ * Return:             status code
+ */
 static efi_status_t EFIAPI efi_dt_fixup(struct efi_dt_fixup_protocol *this,
                                        void *dtb,
                                        efi_uintn_t *buffer_size,
@@ -158,3 +160,8 @@ static efi_status_t EFIAPI efi_dt_fixup(struct efi_dt_fixup_protocol *this,
 out:
        return EFI_EXIT(ret);
 }
+
+struct efi_dt_fixup_protocol efi_dt_fixup_prot = {
+       .revision = EFI_DT_FIXUP_PROTOCOL_REVISION,
+       .fixup = efi_dt_fixup
+};