clk: rk3399: Fix eMMC get_clk reg offset
[oweals/u-boot.git] / lib / efi / efi.c
index b1c7360ddcd5bc4f48a95b6f206f4f877da14ef0..0c16a5fdd38a983e23c06c998aa782319c29e971 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2015 Google, Inc
  *
- * SPDX-License-Identifier:    GPL-2.0+
- *
  * EFI information obtained here:
  * http://wiki.phoenix.com/wiki/index.php/EFI_BOOT_SERVICES
  *
@@ -12,6 +11,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <errno.h>
+#include <malloc.h>
 #include <linux/err.h>
 #include <linux/types.h>
 #include <efi.h>
@@ -54,7 +54,7 @@ void efi_puts(struct efi_priv *priv, const char *str)
 int efi_init(struct efi_priv *priv, const char *banner, efi_handle_t image,
             struct efi_system_table *sys_table)
 {
-       efi_guid_t loaded_image_guid = LOADED_IMAGE_PROTOCOL_GUID;
+       efi_guid_t loaded_image_guid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
        struct efi_boot_services *boot = sys_table->boottime;
        struct efi_loaded_image *loaded_image;
        int ret;
@@ -70,7 +70,7 @@ int efi_init(struct efi_priv *priv, const char *banner, efi_handle_t image,
        efi_putc(priv, ' ');
 
        ret = boot->open_protocol(priv->parent_image, &loaded_image_guid,
-                                 (void **)&loaded_image, &priv->parent_image,
+                                 (void **)&loaded_image, priv->parent_image,
                                  NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
        if (ret) {
                efi_puts(priv, "Failed to get loaded image protocol\n");