Browse Source

efi: Tidy up header includes

Two files relies on efi_driver.h to include common.h and dm.h which is
incorrect. The former should always be included in a non-host C file and
the latter should be included if driver model is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass 3 years ago
parent
commit
e1e10f29f9
3 changed files with 3 additions and 2 deletions
  1. 0 2
      include/efi_driver.h
  2. 1 0
      lib/efi_driver/efi_block_device.c
  3. 2 0
      lib/efi_driver/efi_uclass.c

+ 0 - 2
include/efi_driver.h

@@ -8,8 +8,6 @@
 #ifndef _EFI_DRIVER_H
 #define _EFI_DRIVER_H 1
 
-#include <common.h>
-#include <dm.h>
 #include <efi_loader.h>
 
 /*

+ 1 - 0
lib/efi_driver/efi_block_device.c

@@ -30,6 +30,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <dm.h>
 #include <efi_driver.h>
 #include <malloc.h>
 #include <dm/device-internal.h>

+ 2 - 0
lib/efi_driver/efi_uclass.c

@@ -17,6 +17,8 @@
  * controllers.
  */
 
+#include <common.h>
+#include <dm.h>
 #include <efi_driver.h>
 #include <log.h>
 #include <malloc.h>