Message ID | 20200719161601.495421-14-sjg@chromium.org |
---|---|
State | Accepted |
Commit | e1e10f29f9b5739b39b08b0c0040ec0cb315f3d7 |
Delegated to: | Tom Rini |
Headers | show |
Series | dm: Avoid including dm.h in header files | expand |
On Sun, Jul 19, 2020 at 10:15:43AM -0600, Simon Glass wrote: > 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> Applied to u-boot/master, thanks!
diff --git a/include/efi_driver.h b/include/efi_driver.h index 840483a416..2b62219c5b 100644 --- a/include/efi_driver.h +++ b/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> /* diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c index e7d8745ad8..0e72a68bce 100644 --- a/lib/efi_driver/efi_block_device.c +++ b/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> diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c index 04e4e45734..0cf74b0361 100644 --- a/lib/efi_driver/efi_uclass.c +++ b/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>
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> --- include/efi_driver.h | 2 -- lib/efi_driver/efi_block_device.c | 1 + lib/efi_driver/efi_uclass.c | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-)